Teaching
211 F '04
 
Assignments
Set 1
Set 2
Set 3
Set 4
Set 5
Set 6
Set 7
Set 8
Set 9
Set 10
Set 11
Set 12
Set 13
Set 14

Problem Set 9

Due date: 11/8 @ 6:00 pm

This problem set covers abstraction and "loops" again.

HtDP Problems:

21.2.1, 21.2.2(1), 21.2.3(1)

The additional problems resume the game theme from the previous week.

Problem 4:

Design the function shots-draw, which consumes a list of Shots and places them in a 100 x 300 scene. Make the scene's background blue.

Problem 5:

Design the function shots-eliminate, which consumes a list of Shots and produces one. In the process, it eliminates all those shots whose coordinates are outside the 100 x 300 range.

Extra Credit Problem:

Create a world of Shots. Then add an animation function that redraws this world every .1 second. Use the functions from Problems 1 through 4.


last updated on Mon Nov 29 11:44:30 EST 2004generated with PLT Scheme