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
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Question Posted: