RU beehive logo ITEC dept promo banner
ITEC 380
2009fall
ibarland

homeinfolecturesexamshwsarchive

lect04c
recursive structs
and the design recipe

The Design Recipe

(Adapted from How to Design Programs)
For each type of data involved:
    1. Data Definition (how will you represent an age, a gender, a book, etc.)
    2. Examples of the Data   (trivial first)
Then, for each function involving that data:
    3. description, signature, and header/stub
    4. test cases
    5a. Case analysis: for a union type, figure out which variant we're in.
    5b. For each variant: if this variant is an aggregate type
        then write down the selectors.  (what is the type of each?)
    5c. add any natural/pertinent function calls on these pieces,
        including any natural recursion
    5d. assemble the parts of 5c.  
    6. Run tests.
See lect04c.ss for today's code we did.

homeinfolecturesexamshwsarchive


©2009, Ian Barland, Radford University
Last modified 2009.Sep.30 (Wed)
Please mail any suggestions
(incl. typos, broken links)
to iba�rlandrad�ford.edu
Powered by PLT Scheme