当前位置:网站首页>Several relationships of UML
Several relationships of UML
2022-06-25 15:35:00 【JackierChan】
Extended relationship :
If you can from the execution of a use case , Switch to another use case when needed , After execution, continue to execute the case before returning
Exists between use cases 《extend》 Relationship .
Inheritance relationships :
Have properties and behaviors common to other transaction types , Each specific thing type inherits it , And implement specific operations that are appropriate for you .
1、 What is a class diagram
Class diagram (Class diagram) It is mainly used to describe the structural design of the system . Class diagrams are also the most commonly used UML chart , The class diagram can show the class 、 And the relationship between them .
2、 The elements of the class diagram
The class diagram contains the following model elements , Namely : class (Class)、 Interface (Interface)、 rely on (Dependency) Relationship 、 generalization (Generalization) Relationship 、 relation (Association) Relationship 、 Aggregate relationship (Aggregation)、 synthetic relation (Composition) And the implementation (Realization) Relationship .
2.1 class (Class)
In object-oriented (OO) Programming , A class is an abstraction of a group of objects with the same characteristics in the real world .

2.2 Interface (Interface)
An interface is a special class , Has the structure of a class but cannot be instantiated , Can only be realized . stay UML in , The interface uses a small circle with a name to represent .

2.3 rely on (Dependency) Relationship
A dependency is a dependency between two or more classes , For example, plants depend on soil . Dependencies can also be subdivided into 5 Types , They are bindings (Binding) rely on 、 Realization (Realization) rely on 、 Use (Usage) rely on 、 abstract (Abstraction) Reliance and authorization (Permission) rely on .
Dependencies are represented by dashed arrows , The arrow points in the dependent direction .

2.4 generalization (Generalization) Relationship
Simply put, it is the inheritance relationship between classes . stay UML in , The generalization relation is a hollow triangle + A solid line , The arrow points to the parent class .

2.5 polymerization (Association) Relationship
Aggregation is a weak coupling relationship between classes , For example, an array of strings and a string are aggregation relations . stay UML Middle class diagram , Use a hollow diamond for aggregation + Solid line arrow , The arrow points to the class being aggregated .

2.6 Combine (Aggregation) Relationship
A composite relationship is a relationship between a whole and a part of a class , If a frog has four legs , The relationship between frogs and frog legs is a combinatorial relationship . stay UML In class diagram , The combination relation is a solid diamond + Solid line arrow , The arrow points to the class being composed .
2.7 relation (Composition) Relationship
Association is a kind of interaction between classes , The direction of influence is the direction of correlation . stay UML In class diagram , The combination relation is represented by a solid arrow .

2.8 Realization (Realization) Relationship ( Interface )
Generally speaking, the implementation relationship is for the relationship between classes and interfaces . stay UML In class diagram , Empty triangle is used to realize the relationship + Dotted line .

3、 Simple class diagram example

How severe :
UML The degree of association in refers to how many instances of one class can be associated with another class .
Symbol description :
1: One
1…1: One
0…*: Zero or more
*: Zero or more
1…*: One or more
0…1: Zero or one
The task of the requirements analysis phase is : To deal with the real world ( organization 、 department 、 Enterprises, etc ) Conduct a detailed investigation , In understanding the overview of the current system , In the process of defining new system functions , Determine system boundary 、 Collect basic data supporting system objectives and their processing methods . One of the tasks in the logic design phase is to further standardize the relational schema .
Entity class : It represents entities in the system domain
Boundary class : The boundary class is the user interface of the system , Interact directly with external participants of the system , Exchange information with the system
The control class : Control class is the interaction between objects in the control system , It is responsible for coordinating the work of other classes , Implement control over other objects
Software
Components
stay UML in , Component means “ Reusable parts in the physical packaging of a set of model element instances ”
Components are the physical realization of system functions ( Such as source code file ), It implements logical model elements defined in class diagrams or interaction diagrams
Components can include **** Code base and runtime files
There are only dependency relationships among components . Dependencies require that one class compile before another .
Components can be viewed as different stages of development ( Compile time 、 Link time and runtime ) The results of
In a project , The definition of components is often mapped to the programming language and the development tools used
边栏推荐
- [paper notes] poly yolo: higher speed, more precise detection and instance segmentation for yolov3
- 2.18 codeforces supplement
- 在国信金太阳开股票账户安全吗?
- Learning notes on February 5, 2022 (C language)
- The last glory of the late Ming Dynasty - the battle of Korea
- User defined data type - structure
- Completabilefuture of asynchronous tools for concurrent programming
- Weka download and installation
- 到底要不要去外包公司?这篇带你全面了解外包那些坑!
- Simulating Sir disease transmission model with netlogo
猜你喜欢

Fishing detection software

Dynamic memory allocation

Summary of four parameter adjustment methods for machine learning

Completabilefuture of asynchronous tools for concurrent programming

5 connection modes of QT signal slot

System Verilog — interface

Js- get the mouse coordinates and follow them

User defined data type - structure

JMeter reading and writing excel requires jxl jar

Highly concurrent optimized Lua + openresty+redis +mysql (multi-level cache implementation) + current limit +canal synchronization solution
随机推荐
Why do I need message idempotence?
iconv_ Open returns error code 22
通过客户经理的开户链接开股票账户安全吗?
RDB and AOF persistence of redis
2.18 codeforces supplement
JMeter reading and writing excel requires jxl jar
Sampling method and descriptive statistical function in R language
JVM memory region details
2. operator and expression multiple choice questions
剑指 Offer 03. 数组中重复的数字
Reflection - learning notes
Learning notes on February 18, 2022 (C language)
网上办理股票开户安全吗?
Weka download and installation
Js- get the mouse coordinates and follow them
Single user mode
Distributed transaction solution
Netlogo learning
Solve the go project compilation error go mod: no such file or directory
Mining procedure processing