Overview
The relationships in a UML class diagram include:
Association, aggregation, composition, dependency, generalization, and Realization)
Association(Association)
Line representation, optional arrows,
Is a relationship in a static structure, which tends to be a data relationship. The relationships in this static structure will be stored with the storage of class files. If one class is the object of another class, the two classes are previously associated. As shown in:
- Public class usermanage {
- Private userinfo;
- }
Aggregation)
It is expressed by solid line, and the aggregation end has a hollow diamond.
Aggregation is a special association and has the meaning of whole-part.
Aggregation: A contained relationship, such as the team and people, the fruit basket, and the fruit in it. That is, individuals get together to become the whole.
Composition: a strong inclusion relationship that has a common life cycle. Such as houses and walls, cars and wheels
It is represented by a solid diamond object attached to the component end.
Composition)
Generalization can be understood by inheritance.
Dependency)
Generalization
Generalization can be understood by inheritance.
Implementation
Implementation can be understood through class implementation Interface