Polymorphism 489
14
Exercises ........................................................................................................
- Show the declaration for a class JetPlane, which inherits from Rocketand
Airplane. - Show the declaration for Seven47, which inherits from the JetPlaneclass
described in Exercise 1. - Write the code that derives Carand Busfrom the class Vehicle. Make Vehiclebe
an abstract class with two pure virtual functions. Make Carand Busnot be abstract
classes. - Modify the code in Exercise 3 so that Caris an abstract class, and derive
SportsCarand Coupefrom Car. In the Carclass, provide an implementation for
one of the pure virtual functions in Vehicleand make it nonpure.