CSci 1301: Problem Set 3

Due: Wednesday, October 1 at 11:59pm e-mail

Please test all your programs carefully and include all the test cases with your program. You must have at least 3 tests for each function, except the ones that produce an image or a scene. Use check-expect for testing, except possibly for images.

Problem 0 (3 points)

This part is due Monday, Sept 29th.

Vote for three cartoons listed here. You will receive a google form for voting. Make sure you are logged in with your morris account to fill in the form.

Problem 1 (20 points)

  1. Exercise 60 (5 points) in Chapter 5.
  2. Exercises 66, 67, 70, 71. For 66 and 67 show examples of using selectors for at least some fields (15 points total) in Chapter 5.

Problem 2 (12 points)

Exercise 49 in section 4.3.

Important: the world state must be an enumeration of three strings: "red", "yellow", "green". The function show should convert it into the picture of the traffic light with that color lit up (and the other two shown as an outline). The state of the traffic light changes on every clock tick. You may start the big-bang with any color.

How to run a world program:

  1. Click run (or press Ctrl-R) to run the program. This loads your program. Note: make sure to re-run (i.e. re-load) after every change!
  2. In the interactions area (the bottom part) type (main 10) (10 is the number of seconds you want to run your program for; change this number as needed), press enter.


CSci 1301 course web site.

The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.