Homework Assignment 5
MCS-178: Introduction to Computer Science II
Max Hailperin, Fall 2001
Due: November 19th (at the beginning of class)
- 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.
- Do exercise 13.35 on page 483.
- Do exercise 14.13 on page 511.
- Do exercise 14.14 on page 513. Note that one of the errata listed
on the textbook's web page is in this exercise; be sure to do the