元素名稱 |
符號圖例 |
含義 |
Class |
 |
包含類的名稱、屬性和方法定義。 可見性修飾符:
- + public
- - private
- # protected
- 無修飾符為 internal
|
Interface |
 |
接口名稱通常以字母 "I" 開頭。 接口定義通常也用於抽象類。 |
Note |
 |
任意的描述性文字。 |
Package |
 |
將類和接口分組。 |
Inheritance Generalization |
 |
B 繼承自 A。 B inherits from A. |
Realization |
 |
B 實現了 A。 B implements A. |
Association |
 |
A 和 B 相互調用和訪問對方的元素。 A and B call and access each other’s elements. |
Association (one way) |
 |
A 可以調用和訪問 B 的元素,但 B 不可以訪問 A 的元素。 A can call and access B’s elements, but not vice versa. |
Aggregation |
 |
A 中擁有一個 B,但 B 脫離於 A 仍然可以獨立存活。 A has a B, and B can outlive A. A "uses" B = Aggregation : B exists independently (conceptually) from A. |
Composition |
 |
A 中擁有一個 B,B 脫離 A 后在系統中沒有任何存活的意義。 A has a B, and B depends on A. A "owns" B = Composition : B has no meaning or purpose in the system without A. |
Dependency |
 |
B 的變化會影響 A,則 A 依賴於 B。 A dependency exists between two elements if changes to the definition of one element (the supplier) may cause changes to the other (the client). |