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

Subclass, Subtype and Substitutability

A subtype is a class that satisfies the principle of substitutability.

A subclass is something constructed using inheritance, whether or not it satisfies the principle of substitutability.

The two concepts are independent. Not all subclasses are subtypes, and (at least in some languages) you can construct subtypes that are not subclasses.

Intro OOP, Chapter 7, Slide 7