next up previous
Next: Template Up: 1.6.1 The Design Recipe Previous: Contract and Header Examples

Each class should include a collection of sample inputs and corresponding outputs for each method. If the body of a method contains more than one control path (e.g. a conditional statement), the collection of examples should include at least one example for each control path. The examples for each method should be included in the main method for the class. In this way, each class can be tested without the support of a special programming environment like DrJava.

Corky Cartwright