Homework Assignment 4

  1. Do exercise 13.5 on page 429.

  2. Do exercise 13.6 on pages 435-436.

  3. Do exercise 13.9 on page 441.

  4. Do exercise 13.28 on pages 478-479.

  5. Do exercise 13.31 on pages 479-480. In addition to the parts (a)-(c) listed there, do the following part (d): The object contains four normal images and an integer in the range 0 to 3. The four images are all four rotations of the original, and the integer specifies which one is currently active. The mutator just updates the integer, as in parts (b) and (c). The selector retrieves one of the four images, using the integer to select which.

    For testing, you'll want to

    (load "~mc27/labs/quilting/quilting.scm")
    from your first MCS-177 lab. This will define images like test-bb and nova-bb as well as quarter-turn-right.