一、UML概述
Unified Modeling Language (UML)又称统一建模语言或标准建模语言,是始于1997年一个OMG标准,它是一个支持模型化和软件系统开发的图形化语言,为软件开发的所有阶段提供模型化和可视化支持,包括由需求分析到规格,到构造和配置。 面向对象的分析与设计(OOA&D,OOAD)方法的发展在80年代末至90年代中出现了一个高潮,UML是这个高潮的产物。它不仅统一了Booch、Rumbaugh和Jacobson的表示方法,而且对其作了进一步的发展,并最终统一为大众所接受的标准建模语言。
二、类图
这里由于使用场景就先介绍最常见的类图(至少需要看懂):
一个类图可以分为:类名——属性清单——方法清单——性质四层
类名:
正体的字表示具体的类(可以被实例化),斜体的代表抽象类
属性:
+ 代表public,- 代表private,# 代表protected
方法:
格式:可见性 名称(参数列表) [ : 返回类型]
+ - #含义与方法一致,下划线表明是静态方法,(需要注意构造方法也在此层,它没有返回值(不是void))
性质:
由变量与对应的setter/getter组成
类之间的主要关系:
继承与实现:空心三角带实线/虚线
聚合(一个对象作为另外一个的实例变量):左边拥有一个右边的实例成员变量
图文解读类图请参见:http://www.uml.org.cn/oobject/201006114.asp
5分钟读懂类图参见:http://www.cnblogs.com/shindo/p/5579191.html
关于系统的UML的知识,有待补充...