UML学习--class diagram
2008-08-30 20:29
141 查看
http://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/ http://atlas.kennesaw.edu/~dbraun/csis4650/A&D/UML_tutorial/class.htm class diagram用于描述对象的类型以及它们之间的关系。
一个class diagram分为三部分:类名,变量和函数。
继承
从子类指向基类的带有空心箭头的实线。图中,BankAccount和withdrawal(amount:Dollars)使用斜体表示序类和虚函数。
关联(association)
双向关联(默认)
两个都知道它们之间的关系
上图表示一个flight最多有一个plane,而一个plane可以分配给0~无穷多个flight。实线旁的数字被称为Multiplicity values。
单向关联(Uni-directional association)
只有一个类知道这种关系。箭头指向不知道这种关系的类。
可见性(visibility)
一个class diagram分为三部分:类名,变量和函数。
继承
从子类指向基类的带有空心箭头的实线。图中,BankAccount和withdrawal(amount:Dollars)使用斜体表示序类和虚函数。
关联(association)
双向关联(默认)
两个都知道它们之间的关系
上图表示一个flight最多有一个plane,而一个plane可以分配给0~无穷多个flight。实线旁的数字被称为Multiplicity values。
Indicator | Meaning |
0..1 | Zero or one |
1 | One only |
0..* | Zero or more |
* | Zero or more |
1..* | One or more |
3 | Three only |
0..5 | Zero to Five |
5..15 | Five to Fifteen |
只有一个类知道这种关系。箭头指向不知道这种关系的类。
可见性(visibility)
Mark | Visibility type |
+ | Public |
# | Protected |
- | Private |
~ | Package |
相关文章推荐
- UML建模学习7:Class Diagram(二)
- UML建模学习6:Class Diagram(一)
- UML学习笔记(六)【状态图】
- UML学习
- 【UML学习】--包图
- UML之类图(Class Diagram)
- 转载:UML学习(一)-----用例图 (silent)
- UML建模学习8:Object Diagram
- [跟我学UML] UML学习之四步走战略 推荐
- UML学习笔记
- UML---Class Diagram
- UML学习(一)类图和对象图
- UML学习笔记(五)【用例图】
- UML学习
- EA&UML日拱一卒-0基础学习微信小程序(9)-C++程序员眼中的app.js
- UML再学习
- UML学习总结
- UML学习(一)-----用例图
- [摘]UML学习一:标准建模语言UML的内容
- UML 学习笔记(二) UML之用例图(User Case View)