In UML class diagrams, the following relationships are common:
- Generalization (generalization)
- Implementation (Realization)
- Association (Association)
- Aggregation (Aggregation)
- Combination (composition)
- Dependency (Dependency)
The order of strength of the various relationships:
Generalization = implementation > Composition > Aggregation > Association > dependencies
First, generalization (generalization):
The inheritance relationship between classes is generalized.
Arrow pointing to: Solid line with triangular arrows, arrow pointing to Parent class
II. Realization (realization)
class implements the relationship of the interface using the implementation.
Arrow pointing: Dashed line with triangular arrows, arrow pointing to Interface
III. Association (Association)
The owning relationship between classes is associated with.
Arrows and points: solid lines with normal arrows, pointing to the owner
Iv. polymerization (Aggregation)
Aggregation is a weak whole and part of the relationship, the whole can be separated from the partial and exist alone.
"Arrows and points": solid lines with hollow diamonds, diamonds pointing to the whole
Five, combination (composition)
The combination is a strong whole and part of the relationship, the whole can not be separated from part of the existence.
Arrows and points: solid lines with solid diamonds, diamonds pointing to the whole
Vi. Dependence (Dependency)
Dependency is a relationship that is used.
Arrows and points: dashed lines with arrows pointing to the user
7. Summary
A complete UML class diagram.
A summary of UML class diagram relationships