Define twigClass by overriding the initial height in treeClass to be 1. Your definition should refer to treeClass to take advantage of future improvements to treeClass's grow method.
Define weedClass by overriding the grow in treeClass to grow the tree by 20.Your definition should refer to treeClass to take advantage of future changes to treeClass's initial height value.
Define fruitTreeClass by adding a numfruits field to treeClass, initialized to 0, and override the grow method to add a new fruit each time the tree grows. (As usual, your definition should rely on treeClass's height and grow.)
Define a fruitTreeMixin function that takes a tree class (could be treeClass, twigClass, or weedClass, for example) and returns a new fruit tree class derived from the given class.
Last update: Tuesday, April 4th, 2000mflatt@cs.utah.edu