Java Reference
In-Depth Information
ȗ
Classroom
ȗ
Object
Exercise R10.7. In an object-oriented traffic simulation system, we have
the following classes:
ȗ
Vehicle
ȗ
Car
ȗ
Truck
ȗ
Sedan
ȗ
Coupe
ȗ
PickupTruck
ȗ
SportUtilityVehicle
ȗ
Minivan
ȗ
Bicycle
ȗ
Motorcycle
Draw an inheritance diagram that shows the relationships between these
classes.
Exercise R10.8. What inheritance relationships would you establish
among the following classes?
ȗ
Student
ȗ
Professor
ȗ
TeachingAssistant
ȗ
Employee
490
491
ȗ
Secretary