Guided Practice 1.2

Here is an example based on Exercise 94 from HtDP/2e:

Design a data representation for the following four kinds of zoo animals:

Write a data definition for ZooAnimal. Be sure to include:

  1. Structure Definitions
  2. Constructor Template
  3. Interpretation
  4. Destructor Template
  5. Examples

Here is a solution. But remember, no peeking! You won't get anything out of this exercise if you don't write down your solution first.

Last modified: Sun Aug 3 09:37:05 Eastern Daylight Time 2014