July 2003
Intermediate to advanced
736 pages
16h 35m
English
When you derive a new class from an existing base class (that is, when you inherit), you get a copy of the members of the base class. We refer to this as an is-a relationship, as in “A Jeep is a car.”
When a class contains another object, this is referred to as containment or aggregation. However, if you define members in the containing class that are implemented in terms of the contained class, you can make the containing class look a bit like and behave like the contained class. The aggregation relationship is referred to as a has-a relationship.
This promotion of members in a contained object is referred to in .NET vernacular as surfacing constituent object members. Technically, the aggregate can perform some ...
Read now
Unlock full access