Introduction to OOP: Chapter 7: Inheritance [next] [previous] [audio] [real] [text]

Heuristics for Subclassing - Construction

The parent class is used only for its behavior, the child class has no is-a relationship to the parent.

An example might be subclassing the idea of a Set from an existing List class.

Generally not a good idea, since it can break the principle of substitutability.

Intro OOP, Chapter 7, Slide 11