Recall the main points from How to Design Programs. The goal is to understand how the well structured data definition determines the structure of the program.
Data definitions: primitive types, structures, unions
Design recipe for data definitions:
structure, unions, self-referential data definitions
Design recipe for functions:
analyze the problem & identify the classes of data (with examples)
formulate a purpose statement and a contract
make up ``functional'' examples
create the template: what information exists to compute the desired result?
program
turn the examples into a test suite
Templates:
for problem alternatives
for structure arguments
for union arguments
for self-referential arguments