---
# System prepended metadata

title: UML 統一碩模語言
tags: [UML]

---

# UML 統一碩模語言

###### tags: `UML`

> Note: 

## :memo: Where do I start?


關係的強弱對比：泛化(generalization)=實現(realization)>組合>聚合>關聯>依賴
![image](https://hackmd.io/_uploads/HJaE0jHv6.png)

![](https://hackmd.io/_uploads/BJSsj4dla.png)
- dependency (use a): 若 class A 的方法需要傳入 object B，則稱為 class A 依賴 class B
    - 箭頭由大指向小
    - ![image](https://hackmd.io/_uploads/B1-o2jHDT.png)

- association (has a): 若 class A 的屬性為object B，則稱為 class A 關聯 class B
    - 箭頭由大指向小
    - ![image](https://hackmd.io/_uploads/rJgx6oHDp.png)

- aggregation (owns a):若 object A 的生命週期和 object B 無關
    - 菱形指向大
    - ![image](https://hackmd.io/_uploads/SJLf6iSvp.png)

- composition (is a part of): 若 object B 會隨著 object A 而死亡，則class A 組合 class B
    - 菱形指向大
    - ![image](https://hackmd.io/_uploads/HJoE6iHPT.png)
- inheritance (繼承, is a)
- implemenation/realization (實作, is like a)


![image](https://hackmd.io/_uploads/rJ5naoBwT.png)

1..* 表示個數至少一個
\* 表示個數為0以上
![](https://hackmd.io/_uploads/r17vfHde6.png)

### Step 2: 


### Step 3:


- [x] **Bold**
- [ ] *Italic*

:::info
:bulb: **Hint:** 
:pushpin: **Remark:**

:::

> Note


## BONUS: More cool ways to HackMD!

- Table

| Features          | Tutorials               |
| ----------------- |:----------------------- |
| GitHub Sync       | [:link:][GitHub-Sync]   |
| Browser Extension | [:link:][HackMD-it]     |
| Book Mode         | [:link:][Book-mode]     |
| Slide Mode        | [:link:][Slide-mode]    | 
| Share & Publish   | [:link:][Share-Publish] |


- Code block with color and line numbers：
```python=3.8
import pandas as pd
```
