当前位置:网站首页>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 .
边栏推荐
- 网络设备硬核技术内幕 防火墙与安全网关篇 (十)
- Network device hard core technology insider firewall and security gateway (VII) virtualization artifact (Part 1)
- LED, nixie tube and key of single chip microcomputer
- Impact of privilege changes on existing connections
- Syntaxerror resolved: positive argument follows keyword argument
- 字节飞书人力资源套件三面
- [CruiseControl]Build Result JSP
- Network equipment hard core technology insider firewall and security gateway (12) the mystery of zero contact office
- Network equipment hard core technology insider firewall and security gateway (11) secrets of zero contact office
- 估值360亿美元!即将进行首次载人发射的SpaceX筹资3.46亿美元
猜你喜欢

一周年创作纪念日,冲吧少年郎

How does JMeter solve the problem of garbled code?

Postman download and use tutorial

Rongyun IM & RTC capabilities on new sites

Recommend a Hongmeng instant messaging software "fruit chat", which is a bit awesome!!

深度刨析数据在内存中的存储

Iperf installation and use

Wavelet transform learning notes

Map set

函数相关知识
随机推荐
C type use of reflection
融云 IM & RTC 能力上新盘点
分支和循环语句题目练习
学习笔记12:Eratosthenes筛选法求素数(100以内) 和 魔方阵
计算属性的基本使用
Network equipment hard core technology insider firewall and security gateway (V) security double repair method
c# 反射之Type使用
Invest 8billion! Nanjing Huatian sealed test phase I project is about to be put into production!
【C语言入门】ZZULIOJ 1026-1030
Ddt+yaml implementation of data driven mechanism based on unittest
推荐系统-精排模型:xDeepFM
ASML launched the first generation HMI multi beam detector: the speed is increased by 600%, which is suitable for 5nm and more advanced processes
Volkswagen China invested 8billion yuan and became the largest shareholder of GuoXuan high tech
[BuildRelease Management]Parabuild
Multithreading & high concurrency (the latest in the whole network: interview questions + map + Notes) the interviewer is calm
小波变换学习笔记
Postman下载、使用教程
Syntaxerror resolved: positive argument follows keyword argument
LED, nixie tube and key of single chip microcomputer
Jerry's Bluetooth can only link back to the last device [article]
