This chapter introduced inheritancethe ability to create a class by absorbing an existing class's data members and member functions and embellishing them with new capabilities. Through a series of examples using an employee inheritance hierarchy, you learned the notions of base classes and derived classes and used public inheritance to create a derived class that inherits members from a base class. The chapter introduced the access specifier protected; derived-class member functions can access protected base-class members. You learned how to access redefined base-class members by qualifying their names with the base-class name and binary scope resolution operator (::). You also saw the order in which constructors and destructors are called for objects of classes that are part of an inheritance hierarchy. Finally, we explained the three types of inheritancepublic, protected and privateand the accessibility of base-class members in a derived class when using each type.
In Chapter 13, Object-Oriented Programming: Polymorphism, we build upon our discussion of inheritance by introducing polymorphisman object-oriented concept that enables us to write programs that handle, in a more general manner, objects of a wide variety of classes related by inheritance. After studying Chapter 13, you will be familiar with classes, objects, encapsulation, inheritance and polymorphismthe essential aspects of object-oriented programming.