| Due date: 9/17 @ 6pm
The goal of this problem set is to practice the design recipe for simple
functions. The functions consume atomic forms of data (numbers, symbols,
images). Some use conditionals to distinguish among different situations.
HtDP Problems
4.2.1, 4.4.1, 5.1.2
Problem A1
Formulate the formulas from Problems 2, 3, and 4 on
Set 1 as Scheme programs. Then apply the strategy of
HtDP problem 4.2.4 to formulate automatic tests for these three
programs. Make sure to turn at least two examples from your table into tests.
Problem A2
Find an image of a spaceship on the web. Then develop a program that
"flies" the spaceship on a 200 x 500 canvas from bottom to top. When the ship's
top end reaches the top margin, make the ship re-appear on the bottom.
Your program should clearly identify at what speed the spaceship moves and a
single change to your program should change the speed of the ship.
|