Generalization vs Realization
“extends” == UML generalization / specialization relationship
“implements” == UML realization relationship
The sub-interface is a
specialization of the
super-interface, not a
realization of it.
Interface extends interface
An association is a "using" relationship between two or more objects
in which the objects have their own life time and there is no owner.
The objects that are part of the association relationship can
be created and destroyed independently.
• n..m n m
Association vs Dependency
Aggregation is a specialized form of association between two or
more objects in which the objects have their own life-cycle but there
exists an ownership as well.
diamond whole part
Composition is a specialized form of aggregation in which if the
parent object is destroyed, the child objects would cease to exist.
C# Java garbage collection composition
C++ pointer delete composition C++