Summary

Section 11.1 Introduction

  • Inheritance (p. 498) enables you to create a class that absorbs an existing class’s capabilities, then customizes or enhances them. The existing class is called the base class (p. 498), and the new class is referred to as the derived class (p. 498).

  • Every object of a derived class is also an object of that class’s base class. However, a base-class object is not an object of that class’s derived classes.

  • The is-a relationship (p. 498) represents inheritance. In an is-a relationship, an object of a derived class also can be treated as an object of its base class.

Section 11.2 Base Classes and Derived Classes

  • A direct base class (p. 499) is the one from which a derived class explicitly inherits. An indirect ...

Get C++ How to Program, 10/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.