Ch 10 Flashcards
Principle of substitution
(Sometimes called subsumption). A variable declared as a parent class can hold (i.e. be filled with) a value that is an instance of a child class.
Subtype
To say that a new class is a subtype of an existing class is to assert that the new class provides all of the operations of the existing class and furthermore satisfies the properties associated with the class. The term subtype describes the behavior of one class in relation to the behavior of another, regardless of how they were constructed.
Subclass
To say that one class is a subclass of another simply asserts that it was built using inheritance. By itself, the subclass relationship says nothing about the behavior of the child in relation to the behavior of the parent.