Exercise Solutions, Ch. 10
Chapter 10 Exercise Solutions
EX 10.1. Draw and annotate a class hierarchy that represents various types of
faculty at a university. Show what characteristics would be represented in the
various classes of the hierarchy. Explain how polymorphism could play a role in
the process of assigning courses to each faculty member.
The abstract method assignCourses is established in the FacultyMember class,
ensuring that child classes will implement it. That way, each class can have a definition
EX 10.2. Draw and annotate a class hierarchy that represents various types of
animals in a zoo. Show what characteristics would be represented in the various
classes of the hierarchy. Explain how polymorphism could play a role in guiding
the feeding of the animals.