Introduction to OOP Chapter 10: Subclasses and Subtypes: next previous audio real text

Subtype, Subclass and Substitution

The distinction between subtype and subclass is important because of their relationship to substitution.

Recall the argument that asserted a child class has the same behavior as the parent, and thus a variable declared as the parent class should in fact be allowed to hold a value generated from a child class.

But does this argument always hold true?

Intro OOP, Chapter 10, Slide 02