Simple understanding of UML class diagram diagram method
- Inheritance : hollow triangle + solid line
- Implementation interface : hollow triangle + dotted line
- Associations : Solid arrows (holds citations, penguins know about climate change, penguins are associated with climate)
- Dependent : dashed arrow (passed as parameter, animals depend on oxygen and water)
- class A is a local variable (of a method) in class B;
- class A is a parameter in the method of class B
- Class A sends a message to class B, which affects class B to change (such as a static method call)
- Aggregation : hollow diamonds + solid arrows (holds a quote, there are many geese in a flock)
- Represents the relationship between the whole and the parts
- Aggregation is also a type of association relationship, which is a strong association relationship
- Combination : solid diamond + solid arrow (holds the instance, has the same life cycle, a bird has two wings)
- It is also the relationship between the whole and the part, but the whole and the part cannot be separated
- Parts and wholes have a unified life cycle, and once the whole object does not exist, the part object will not exist either.
- It is also a kind of association relationship, which is stronger than the aggregation relationship.