text
function referred to in the hint is actually
discussed in section 4.4, not 4.1; it's the same function needed for
exercises 4.4.2 and 4.4.3 from homework 2. All of the problems are programming problems, so in principle you
could write them all in one Definitions pane. Unfortunately, if you
call run-animation
more than once in the same Definitions
pane and click "Run", it'll start each animation in turn, a
fraction of a second apart, in the same window, and you'll end up seeing
only the last one. There are two solutions to this:
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). Note that "errors" means not only error messages from DrScheme, but also wrong answers.
For every function you write, be sure to follow the design recipe. If a particular animation requires writing two or three functions, that means go through all five steps of the design recipe two or three times for that animation.
Be sure to choose meaningful names for functions and parameters, and watch for opportunities to re-use functions you (or the textbook) have already written.
This assignment is to be done in pairs, using the ideas from the "kindergarten" article. Choose a partner ASAP and schedule time to work together on the assignment. When you're finished, turn in one assignment with both names on it. You'll have a different partner for homework 4, so if you don't get along with this partner, remember it's only for a week.
Error log: /15
(I'm not grading on how many or how few errors you encountered,
only on whether you recorded them correctly.)
I sha'n't actually grade all five problems; consider the others "practice". For each function I grade, see the table below.
The table below has columns for each step in the design recipe. You won't turn in a separate skeleton and definition, but rather write a skeleton and then add stuff to turn it into a definition. However, if you don't get the definition working, you'll still get partial credit for a correct skeleton.
Contract | Examples | Skeleton | Definition | Test results | Working animation |
---|---|---|---|---|---|
/5 | /5 | /5 | /10 | /5 | /5 |
Following directions | /10 |
Writing contracts from word problems | /10 |
Choosing examples | /10 |
Choosing names | /10 |
Coding | /10 |
Code re-use and function composition | /10 |