Address: http://developer.51cto.com/art/201006/205392.htm
This section briefly introduces the UML class diagram symbols, each of which has different meanings. I hope you will have some knowledge about the UML class diagram symbols through this section, next let's take a look at the detailed introduction of UML class diagram symbols.
UML class diagram symbol Software Engineering
1. generalization (inheritance)
The solid arrow indicates that a base class B inherits Class.
2. Implementation
The dotted arrow in the UML class diagram symbol indicates implementing an interface: Class C implementation interface (now it seems to be displayed as a line without an arrow)
3. Association
The Association in UML class diagram symbols is divided into one-way and two-way Association.
Association and class attributes are very similar.
3.1 unidirectional Association: only one class can be accessed from one class (the former has the latter attribute)
Class B unidirectional Association Class A (Class B has an object whose property A is)
3.2 bidirectional Association: two classes can access each other (both attributes of the two classes have the other)
Class B associates Class A (Class B has an object whose property A is)
Class A is associated with Class B (Class A has the attribute BS as set, and set contains the objects of Class B)
A and B are 1-to-n (n> 0) associations.
3.3 aggregation relationship
It is known that the wheel class plays the role of wheels and aggregates four to the car object.
The hollow diamond in the UML class diagram symbol indicates that the wheel object is not created and destroyed with the creation of the car.
3.4 composite relationship
The company class is completely composed of Department objects.
The central diamond in the UML class diagram symbol indicates that the Department object is created and destroyed along with the creation of the company object.
4. Dependency
The dependencies in UML class diagram symbols refer to the call relationships between classes. In UML, they are represented by arrows with dotted lines. If the Class A contains the attributes or methods of Class B,
Or Class A is responsible for instantiating Class B, so Class A depends on Class B. Unlike associations, you do not need to define B-type attributes in Class.