Overview


Class inheritance is also a solid tool to have in our generalizing and reusing toolbox.

Note that in most cases/problems we'll use it less than we use object composition.

Concept


The Class Diagram below has four classes.

The shape class is called the superclass. The other three classes are called subclasses. The subclasses inherit from the superclass.