Chapter 5. The Inheritance Relationship
Introduction to the Inheritance Relationship
The inheritance relationship is one of the more important relationships within the object-oriented paradigm. It is best used to capture the a-kind-of relationship between classes, such as ChevyChevelle
is a-kind-of Car
, Dog
is a-kind-of Animal
. Its primary purpose is twofold: It acts as a mechanism for expressing commonality between two classes (generalization), and it is used to specify that one class is a special type of another class (specialization). The terms “specialization” and “generalization” are generally considered synonyms of “inheritance.” They are used often during object-oriented design critiques to discuss the process under which inheritance was ...
Get Object-Oriented Design Heuristics now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.