Subtyping, Inheritance, Delegation, and Reuse in C++.

16 April 1990

New Image

There are several related concepts used in design and implementation of object-oriented programming, and their proper use is often a source of questions and mistakes for inexpert users. Among these concepts are inheritance and forwarding, both implementation techniques. More important than these techniques, however, is the concept of types, and the relationship between types described by subtyping. A proper mapping from application domain types and entities onto solution domain classes and objects is crucial to a clean and evolvable design. This memo investigates this topic from the perspective of the C++ programming language (as the issue is somewhat language dependent) using didactic examples.