Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the symbol of UML class diagram?

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Xiaobian to share with you what UML class diagram symbols, I believe most people do not know how, so share this article for your reference, I hope you have a lot of harvest after reading this article, let us go to understand it together!

UML Class Diagram Symbols Software Engineering

1. Generalization (inheritance)

A solid arrow means inheriting a base class. Class B inherits class A.

2. Realization

The dashed arrow in the UML class diagram symbol represents the implementation of an interface: Class C implements the interface Interface (now appears as a line without the arrow)

3. Association

UML class diagram symbols are divided into one-way and two-way association.

The attributes of associations and classes are similar.

3.1 One-way association: only one class can be accessed from another class (the former has the latter in its properties)

Class B one-way association Class A (objects with attribute A in B)

3.2 Bidirectional association: two classes can access each other (both classes have each other in their attributes)

Class B is associated with Class A (objects with attribute A in B)

Class A is associated with Class B (there is an attribute bs in A that is Set, and Set contains objects of B)

A and B are 1-to-n(n>0) correlations

3.3 aggregate relationship

As you can see from the above figure, the Wheel class plays the role of wheels, aggregating 4 into the Car object

The hollow diamond in the UML class diagram symbol indicates that the Wheel object is not created with the creation of the Car, but destroyed with the destruction.

3.4 Combinatorial relations

As you can see from the figure above, the Company class consists entirely of Department objects.

The solid diamond in the UML class diagram symbol indicates that the Department object is created with the creation of the Company object, and destroyed with the destruction.

4. Dependence

Dependency in UML class diagram notation refers to the invocation relationship between classes, represented by dashed arrows in UML. If class A accesses properties or methods of class B,

Or class A is responsible for instantiating class B, then class A can be said to depend on class B. Unlike associations, there is no need to define attributes of type B in class A.

The above is "UML class diagram symbols what" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report