Draw an inheritance hierarchy for types of sports similar to the hierarchy show in Fig. 9.2. Use

Question:

Draw an inheritance hierarchy for types of sports similar to the hierarchy show in Fig. 9.2. Use Sports as the superclass of the hierarchy, then extend Sports with classes IndoorSports and OutdoorSports. Continue to extend the hierarchy as deep (i.e., as many levels) as possible. For example, Badminton, TableTennis, and Chess might extend IndoorSports, and Football, Baseball, and Rugby might be subclasses of OutdoorSports. After drawing the hierarchy, discuss the relationships that exist between the classes.

Fig. 9.2

Administrator Faculty Employee Teacher Community Member Staff Student Alumnus

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: