CSci 1301: Lab 4

Friday, Octiber 14. Due: Friday, October 21 at 11:59pm by e-mail

What to submit

The lab is done in groups of 2. In the beginning of each file please write (in comments) the names of all group members.

At the end of the lab please send me and your group partner(s) all your Racket files as e-mail attachments. My e-mail is elenam at morris.umn.edu. The subject of your e-mail must be "1301 Lab 4" followed by "Final" or "Not final", depending on whether this is a final submission or you are still working on it. If you need to finish it, make sure to set up a time with your group partner(s) to finish the lab.

Task 1 (15 points): walk signal

Exercise 108. We have talked about it in class on Wednesday.

Task 2 (4 points): equality for traffic light values

Exercise 115. Make sure to read section 6.5 first. Your function has to implement the given check-expect tests.
Come up with test cases for the error messages when the first argument is not a light (for instance, (light=? "maroon" "red")) and when the second one isn't (for instance, (light=? "yellow" "lime")). Note that if the both arguments are not traffic light colors, only the first error message will trigger.

Task 2, extra credit (3 points): equality for traffic light values

Change the error message so that it says what string was passed as an "offending" value. For instance, your message may include something like "traffic light expected as second argument, given: purple"


CSci 1301 course web site.