James P. Cohoon,
University of Virginia Jack W. Davidson,
University of Virginia
Inheritance
Chapter Objectives
Upon completion of this chapter the student will understand and be able to utilize the following key concepts:
Inheritance is the ability to define new classes using existing classes as a basis.
The new class inherits the attributes and behaviors of the classes on which it is based, and in addition, it can have attributes and behaviors that are specific to it.
We introduce C++’s inheritance mechanism by developing a class hierarchy for representing and displaying two-dimensional
shapes.