Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of UML Class Diagram symbols

Shulou Source: shulou.com Published: 2022-06-02 05:57:52 10月04日 Update

This article mainly introduces the example analysis of UML class diagram symbols, the article is very detailed, has a certain reference value, interested friends must read it!

A brief introduction to UML Class Diagram symbols

1. Class (Class): represented by a three-layer rectangular box.

The first layer displays the name of the class, or italics if it is an abstract class.

The second layer is the fields and properties.

The third layer is the method of the class.

Notice the previous symbol, + for public,- for private,# for protected.

2. The interface of UML class diagram symbols: it is represented by a two-layer rectangular box, which is mainly different from the class diagram in that it is displayed at the top.

The first line is the interface name.

The second line is the interface method.

3. The inheritance class (extends) of UML class graph symbols: represented by hollow triangles + solid lines.

4. UML class diagram symbol implementation interface (implements): represented by hollow triangles + dashed lines

5.UML class diagram symbol association (Association): represented by solid line arrows, for example, swallows and climate

6. Aggregation of UML class diagram symbols (Aggregation): represented by hollow diamond + solid line arrows

Aggregation: represents a weak ownership relationship, indicating that An objects can contain B objects, but B objects are not part of An objects, such as companies and employees

Composition: represented by a solid diamond + solid line arrow

Combination: the relationship between the part and the whole, and the life cycle is the same. For example: people and hands

7. UML class diagram symbol dependence (Dependency): represented by dotted arrows, such as animals and oxygen

Cardinality of 8.UML class diagram symbols: the numbers at both ends of the connection indicate that there can be several instances of the class at this end, for example, a bird should have two wings. If a class may have countless instances, it is represented by n. Association, aggregation and combination have cardinality.

The above is all the contents of the article "sample Analysis of UML Class Diagram symbols". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Symbols solid lines objects interfaces arrows combinations examples analysis triangles contents names cardinals instances methods rectangles articles diamonds dashed lines triangles associations Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi OPPO Reno NVidia Apple MySQL