8.6 Placement 3
On this page:
8.6.1 Language
8.6.2 Library
8.6.3 Reading
8.6.4 Task
8.6.5 Turnin

8.6 Placement 3

8.6.1 Language

For the following assignment, you must use Racket’s Beginning Student with List Abbreviations language. Go to the Language menu, select Choose Language, and pick the language from the Teaching Languages section.

8.6.2 Library

In Placement 2 you defined the function is-in?. This is built into Racket with the name member. You may use member from now on.

We will also be using characters, which are the elements of strings. Characters are written with a #\ prefix: e.g., #\c, #\s. You can turn strings into lists of characters and vice versa using string->list and vice versa with list->string.

Note that some functions in this assignment would benefit from creating a helper function to handle a complex sub-task.

8.6.3 Reading

Read Part 2 of HtDP 2/e, specifically chapter 10.1. You can read past it if you feel the need as you’re doing the assignment.

If you find something unfamiliar, recall that we skipped reading Part 1 so you may need to peek in there to look up something.

8.6.4 Task

Define the following functions.

8.6.5 Turnin

This time you will turn in two files.

One file, named p3-code.rkt, contains the five functions named above (it can contain any other helper definitions you like as well). The functions must be named exactly as above and must take parameters exactly as above. (Note: Google Drive will automatically rename your file(s) to include your name. This is fine.)

In addition, make a copy of just the test cases for the required functions—not their implementations, nor tests for any other functions—and put them in another file, p3-tests.rkt. Turn this in as well.

Failure to follow any of these instructions may result in zero credit.

Upload your file here. You will need to be logged into the Google@Brown domain to upload.