Parametric Polymorphism
"Inheritance" is run time poluymorphism.
"Generic" is parametric poluymorphism. poluymorphism at complie time.
- A list of any types
- A list of some contraint types
Parametric Polymorphism
"Inheritance" is run time poluymorphism.
"Generic" is parametric poluymorphism. poluymorphism at complie time.
for example, comments and identifiers
Some better illustrated examples can be found in UBCx: SoftConst2x - Software Construction: Object Oriented Design's course lecture on Coupling.
If one object is part of another object, then we use a diamond at the start of the arrow (next to the containing object), and a normal arrow at the end.
Another way of thinking of this is, if the original owner (source) object and the owned (target) object share the same life cycle -- that is, the owned exists only when the owner does -- we say that the owner aggregates owned object(s). They share a whole-part relationship.
What I did like very much about the video, was when the instructor pointed out that there's a small fallacy: aggregation, in OOD, does not really imply that owned object(s) must be a list.