Original
Inheritance: Solid line of the hollow triangle arrow. The Child class points to the parent class. Common keywords in code are extends (Java ).
Implementation: Dotted line of the hollow triangle arrow to implement class pointing interface. The implements keyword (Java) is usually used in the code ).
Association: Generally, the instance of another class B needs to be referenced in Class A as a member variable, indicating that Class A needs to "know" Class B. The solid arrow. Class A points to Class B.
DependencyGenerally, a method in Class A requires an instance of Class B as its parameter or variable, and Class A itself does not need to reference an instance of Class B as its member variable. The dotted arrow points to Class B.
Aggregation: Generally, Class A needs to include an instance or a set of instances of another class B, indicating a weak "ownership" relationship, that is, Class A contains Class B, but Class B is not a part of Class A, but an independent class. The solid arrow with a hollow diamond tail points to Class B.
Synthesis: Class B is usually instantiated in its constructor while Class A is instantiated, so that Class B is a part of Class A and represents a strong "ownership" relationship, that is, Class B is a part of Class A, which has a strict "Whole-part" relationship. The implementation arrow at the end is solid diamond, and Class A points to Class B.
(Conversion) Six relationships in UML class diagrams