This chapter introduced inheritance—the ability to create classes by absorbing an existing class’s members and enhancing them with new capabilities. You learned the notions of base classes and derived classes and created a derived class that inherits members from a base class. The chapter introduced access modifier
protected; derived-class members can access
protected base-class members. You learned how to access base-class members with
base. You also saw how constructors are used in inheritance hierarchies. Finally, you learned about the methods of class
object, the direct or indirect base class of all classes.
In Chapter 12, we build on our discussion of inheritance by introducing polymorphism—an object-oriented concept that enables ...