Chap09 EX Solutions

Chap09 EX Solutions - Java Software Solutions, 6th Edition...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Java Software Solutions, 6 th Edition Exercise Solutions, Ch. 9 Chapter 9 Exercise Solutions EX 9.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 of assignCourses that makes sense for it (depending on the rank and other issues). A program that manages a list of various faculty member objects could then assign courses to everyone by making a polymorphic call to assignCourses for each faculty member. EX 9.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.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Chap09 EX Solutions - Java Software Solutions, 6th Edition...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online