Introduction to OOP: Chapter 20 : A Second Look at Classes
Implications of Classes for Types
The is-a relation produces some subtle issues
At the time the programmer analyzes a program, he or she may not know the
final type of objects (which may be a subclass).
Inheritance only ensures that interface is maintained, not
other properties of execution.
Subclasses are not guaranted to preserve all aspects of a parent class.
(may take longer, perform actions in different sequence, etc).
Testing of a program, even proofs of correctness, may no longer be sufficient
if some portion of the program is replaced by a subclass.