Home Segments Index Top Previous Next

246: Sidetrip

Ordinarily, the existence of sibling classes is justified by differing behavior with respect to a variety of polymorphic methods. As defined in this chapter, the Vegetable, Dairy, Meat, and Grain differ in behavior only with respect to the illustrative isVegetable method.