CSC 160 HW8
Assigned 19 April, due 1 May
For all the programming assignments, be sure to follow the design recipe.
Write
your function contract, examples, and function definition in the Definitions
Window, save it to a file, and send me this file. Also, test
your program by typing each of your examples into the Interactions Window,
save it to a file, and send me this file. Be sure to choose meaningful
names for functions and parameters, and watch for opportunities to use
functions you've already written.
Also turn in a log of how many errors of different kinds you
encountered in the assignment, with brief comments describing each one
("mismatched parentheses" is self-explanatory, but more complex errors
might need more description).
This assignment is to be done in pairs, as before.
- Do exercises
10.2.1 and
10.2.2. (Note: in order to build examples for problem 10.2.2,
you'll need to build structures that contain pictures. I recommend that
you use a Web browser to copy the pictures of
a robot,
a doll,
a rocket,
and any other pictures you see on the Web that you'd like to manipulate
from within Scheme.)
- Do all the exercises in section
10.3.
Note: Don't use the list template blindly. Some functions require doing
something to each element of a list in turn, so these will use the
usual list template; but other functions require doing something to the
whole list, then doing something else to the
whole list, etc; these will not follow the usual
template for functions working on lists.
- Do (but don't turn in) exercises
11.2.1 and
11.2.2
(if you didn't already do them in class).
Note: for problem 11.2.2, an example is
(tabulate-f 3) "should be (list (make-posn 3 8) (make-posn 2 -1)
(make-posn 1 -4))"
- Do exercises
11.3.1
and
11.3.2.
- For extra credit, do some of exercises
11.3.5,
11.4.2, and
11.4.7.
Last modified:
Stephen Bloch / sbloch@adelphi.edu