Ch 10 Flashcards

1
Q

Principle of substitution

A

(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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Subtype

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Subclass

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly