当前位置:网站首页>UML diagram memory skills
UML diagram memory skills
2022-07-06 08:49:00 【look-word】
What is? UML Class diagram
- Class Diagram: Used to represent class 、 Interface 、 The static relationship between instances
- Although the name is class diagram , But there are not only classes in the class diagram
Memory skills
UML Arrow direction :
From child to parent
I Believe Many students will have the same idea as me , Think that subclasses are based on parent classes , The arrow should point from the parent class to the child class
So how do we remember ?
- Subclasses need to be defined through extends Keyword to specify the parent class
- The subclass must know the definition of the parent class , But the parent class doesn't know the definition of the subclass
- Only by knowing the definition of the other party can we point to the other party
- So the direction of the arrow is that the subclass points to the parent
The meaning of line
Solid line --> Inherit Dotted line –> Realization
- You can see Wild geese are a class An interface implemented It points to the interface Because the interface doesn't know the definition of geese
- Duck is the parent of Donald Duck is just a subclass So it points to the parent duck
How to remember ?
- The hollow triangle represents : To inherit or implement
- Realization - Inherit : is a The relationship between , Extended purpose , Don't empty , It's very strong
- Dotted line - Realization : The dotted line represents ‘ Need to be ’ No entity
Solid line --> relation Dotted line –> rely on
- The relationship is stable , A real relationship , Iron elder brothers
- Indicates that one class object is associated with another class object
- Usually, there is another class object in a class as an attribute
- You can see The emergence of penguins is related to the climate So they are related
- Dotted line –> rely on
- Use it temporarily , be neither friendly nor aloof , with no reality whatever , not much , if any
- Represents a usage relationship , One class needs to implement functions with the help of another class
- Generally, one class uses another class as a parameter , Or as a return value
The diamond
- A diamond is a vessel for holding things ( Plates, for example )
polymerization ∶ It means you can put a lot of the same things in an empty vessel , Get together ( The class indicated by the arrow direction )
Combine ∶ It represents the existence of physical structure in the full vessel , go through thick and thin together
The relationship between the whole and the part
Weak relationship
Negative words : weak - empty
The relationship between the whole and the part , Compared with the relationship of aggregation , The relationship is stronger, and they have the same life cycle ,contains-a The relationship between
A strong relationship
Positive words ∶ strong - full
边栏推荐
- Leetcode: Sword finger offer 42 Maximum sum of continuous subarrays
- LeetCode:162. 寻找峰值
- 广州推进儿童友好城市建设,将探索学校周边200米设安全区域
- 随手记01
- vb.net 随窗口改变,缩放控件大小以及保持相对位置
- Roguelike game into crack the hardest hit areas, how to break the bureau?
- ROS compilation calls the third-party dynamic library (xxx.so)
- pytorch训练好的模型在加载和保存过程中的问题
- Double pointeur en langage C - - modèle classique
- marathon-envs项目环境配置(强化学习模仿参考动作)
猜你喜欢
随机推荐
LeetCode:劍指 Offer 42. 連續子數組的最大和
FairGuard游戏加固:游戏出海热潮下,游戏安全面临新挑战
Marathon envs project environment configuration (strengthen learning and imitate reference actions)
Browser thread
C语言深度解剖——C语言关键字
TDengine 社区问题双周精选 | 第三期
JVM quick start
Image, CV2 read the conversion and size resize change of numpy array of pictures
marathon-envs项目环境配置(强化学习模仿参考动作)
Light of domestic games destroyed by cracking
同一局域网的手机和电脑相互访问,IIS设置
Double pointeur en langage C - - modèle classique
力扣每日一题(二)
TP-LINK enterprise router PPTP configuration
JS pure function
TCP/IP协议
LeetCode:41. 缺失的第一个正数
企微服务商平台收费接口对接教程
查看局域网中电脑设备
Revit 二次开发 HOF 方式调用transaction