next up previous
Next: Problem Design: PigLatinApplet Up: In the Laboratory: Pig Previous: The Algorithm

Problem Design: The PigLatin Class

The above analysis leads to the following specification for the PigLatin class. Its main role is to translate English expressions into Pig Latin. One design we could use here is to model PigLatin after the Math class -- that is, as a utility class which provides a useful method, but which is not designed to be instantiated at all.

As this design suggests, the PigLatin class will have only one public method but will utilize the private methods described above to help perform its task.



Ralph Morelli {Faculty}
12/22/1999