当前位置:网站首页>Six relationships of UML class diagram, the best way to learn and understand
Six relationships of UML class diagram, the best way to learn and understand
2022-07-28 01:02:00 【Small target youth】
UML What is it? ?
The more official description is like this :
UML(Unified Modeling Language) It's an open way , Pertaining to 、 visualization 、 Build and write a developing 、 Object oriented 、 Open methods of software intensive system products .
And my description :
UML Count as Between R & D and non R & D For business design Way of communication .
and , Before you write the code , Design must be first .
Code written without thinking ... It's thoughtless .
The class diagram structure

Interface diagram structure

UML Class diagram Of Six relationships
Inherit 、 Realization 、 Combine 、 polymerization 、 relation 、 rely on
Each relationship has its own way of expression , That is to say Line + arrow form
Professional lines and arrows

Professional symbols
Properties and methods “+”、“-” and “#” Indicates access level :
+:public
-:private
#:protected
Combined with examples 、 Schematic diagram Study
Inheritance relationships
The inheritance relationship between classes , You must be familiar with , Father and son , Inherit the father and the son .
Icon :

Realization relationship
Implementation relationship between class and interface , You must be no stranger .
Icon :

Aggregate relationship
What is embodied is A object ( School ) Can contain B object ( teacher 、 Student ), but B Object is not A Part of the object .
teacher 、 Student , If the school doesn't exist , They can still exist alone .
Aggregation represents a weak ‘ Have ’ Relationship .
Icon :

synthetic relation
What is embodied is A object ( Phoenix ) Can contain B object ( Wing 、 Claws, etc ).A As a whole , B As part .
If A be without ,B It's gone . The Phoenix is gone , Its wings are also equivalent to missing .
The whole and the part have the same life cycle .
Combination represents a strong ‘ Have ’ Relationship .
Icon :

Connections
Connections , Obviously, there is There are associations between classes , That's it
Two way toTwo way connection .Well, for example , The connection between students and teachers , Students associate with multiple teachers , Teachers can also manage multiple students .
Of course, there are One way Association , That is, students are related to multiple courses , But the course can't actively relate to students .
Actually , There is also a connection between oneself , Self correlation .
Icon :

Dependency relationship
In fact, there is a little similar correlation , however Dependency has a very personal characteristic ,
Namely Methods of one class use objects of another class as parameters .
Icon :
Okay , That's all for this article .
边栏推荐
- How to smoothly go online after MySQL table splitting?
- Add a picture in front of the cell
- 592. Fraction addition and subtraction: introduction to expression calculation
- [CruiseControl]Build Result JSP
- The most detailed summary of common English terms in the chip industry (quick grasp of graphics and text)
- 字节飞书人力资源套件三面
- Network equipment hard core technology insider firewall and security gateway (12) the mystery of zero contact office
- Uniapp display rich text effect demo (organize)
- Network equipment hard core technology insider firewall and security gateway (V) security double repair method
- C type use of reflection
猜你喜欢

Map set
![Jerry, if you turn on Bluetooth again, one for two. When the mobile phone is connected to the prototype, it will appear and cannot be connected [chapter]](/img/6c/d4a45981a7fc87f6a82a91017f8ce8.png)
Jerry, if you turn on Bluetooth again, one for two. When the mobile phone is connected to the prototype, it will appear and cannot be connected [chapter]

小波变换学习笔记

Maximize activation

110. SAP UI5 FileUploader 控件深入介绍 - 为什么需要一个隐藏的 iframe

Red team killer behinder_ V4.0 (ice scorpion 4.0)

Basic operations of MySQL database (2) --- Based on data table

UML类图的六大关系,最佳学习理解方式

福特SUV版“野马”正式下线,安全、舒适一个不落

深度刨析数据在内存中的存储
随机推荐
Recommended system - offline recall: u2tag2i, ICF
分支和循环语句题目练习
LED, nixie tube and key of single chip microcomputer
Wavelet transform learning notes
592. Fraction addition and subtraction: introduction to expression calculation
Border width border fillet border color
Swear, swear, swear
Jericho will make a popping sound when turning on, broadcasting a prompt tone, and turning off [chapter]
学习笔记12:Eratosthenes筛选法求素数(100以内) 和 魔方阵
DC motor winding parameters
网络安全漏洞分析与漏洞复现
c# 反射之Type使用
Firefox 103, the Firefox browser, has been released to improve performance under high refresh rate displays
Jerry's prompt sound processing when switching devices [chapter]
Leetcode - find the median of two positively ordered arrays
Postman下载、使用教程
红队大杀器 Behinder_v4.0(冰蝎4.0)
Logic of automatic reasoning 09 - automatic theorem proving
Byte flybook Human Resource Kit three sides
R language evaluates the relative importance of the predictive factors (variables, characteristics) of the regression model, scales the predictive variables of the regression model, and then construct
