slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
设计类图 PowerPoint Presentation
Download Presentation
设计类图

Loading in 2 Seconds...

play fullscreen
1 / 11

设计类图 - PowerPoint PPT Presentation


  • 110 Views
  • Uploaded on

设计类图. 小组成员: 江 帆 康乐 梁忠 彪 王金鑫. 类图有多重要?.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '设计类图' - isabelle-whitfield


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

设计类图

小组成员:

江帆

康乐

梁忠彪

王金鑫

slide2
类图有多重要?
  • Martin Fowler在其著作《UML Distilled: A Brief Guide to the Standard Object Modeling Language, Third Edition》(《UML精粹:标准对象建模语言简明指南(第3版)》)中有这么一段:“If someone were to come up to you in a dark alley and say, ‘Psst, wanna see a UML diagram?’ that diagram would probably be a class diagram. The majority of UML diagrams I see are class diagrams.”(“如果有人在黑暗的小巷中向你走来并对你说:‘嘿,想不想看一张UML图?’那么这张图很有可能就是一张类图,我所见过的大部分的UML图都是类图”)(高冷。。。)
slide3
类的UML图示
  •  在UML类图中,类一般由三部分组成:类名、类的属性、类的操作
  • 在UML中,类使用包含类名、属性和操作且带有分隔线的长方形来表示
  • 例:
slide4
类图的几种关系
  • 1. 泛化(Generalization)
  • 关键词:继承
  • 【箭头指向】:带三角箭头的实线,箭头指向父类
  • 2. 实现(Realization)
  • 关键词:类与接口
  • 【箭头指向】:带三角箭头的虚线,箭头指向接口
  • 3. 关联(Association)
  • 关键词:拥有
  • 【箭头及指向】:带普通箭头的实心线,指向被拥有者
slide5
类图的几种关系
  • 4. 聚合(Aggregation)

关键词:整体与部分可独立

【箭头及指向】:带空心菱形的实线,菱形指向整体

  • 5.组合(Composition)

关键词:整体与部分2 不独立

【箭头及指向】:带实心菱形的实线,菱形指向整体

  • 6. 依赖(Dependency)

关键词:使用

【箭头及指向】:带箭头的虚线,指向被使用者

slide6
怎么画类图
  • 先绘制顺序图
  • 根据顺序图绘制类图
7 design class diagram

7. 设计类图(Design Class Diagram)

实验目的:

1. 掌握设计类图的涵义和内容2. 掌握设计类图的绘制方法3. 掌握设计类图与顺序图之间的关系实验内容:

1. 以练习五,任务2“订单生成”顺序图为基础,建立以订单、购物车为核心对象的设计类图。要求,对象,属性,方法(职责),对象之间依赖关系实验指导:

1. UML 2 Class Diagrams [http://www.agilemodeling.com/artifacts/classDiagram.htm]2. 软件开发设计模型 - 类图 [http://msdn.microsoft.com/zh-cn/library/dd409436.aspx]