A seaplane is a water vehicle, and a seaplane is an air vehicle. A mammal is an animal. A flying animal is an animal. A bat is both a mammal and a flying animal. We can treat objects of a class derived with public inheritance as if they were objects of the base class.
Inheritance contributes to the idea of software as reusable components .
But for inheritance to be useful, there must be good interfaces in the base class - more on that when we discuss protected members. The big payoff in inheritance comes when we discuss polymorphism, so be patient. It is a really bad idea to treat an object of a base class as if it were an object of a class derived from that base class. Let's go through the example on pp. Observe the member initializer syntax used to call the base-class constructor.