1 / 26

6. 顺序图

6. 顺序图. 课程内容. 什么是顺序图? 如何应用顺序图? 如何对一个对象创建建模? 如何使用 UML2.0 中新添加的有关顺序图的内容? 顺序图在 UML 大图中应该处于什么位置. 什么是顺序图?. UML 可让你方法视野,显示出一个对象如何与其它对象交互。 在这个“放大”中,要包含的重要的一维:时间 顺序图的关键思想是对象之间的交互是按照特定的顺序发生的。. 顺序图:对象. 顺序图:消息. 顺序图:消息. 顺序图:消息. 顺序图:时间. 顺序图的图符集. 案例:汽车和车钥匙. 汽车和车钥匙:类图. 通过添加关键字可以把信号建模成一个类.

Download Presentation

6. 顺序图

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 6. 顺序图

  2. 课程内容 • 什么是顺序图? • 如何应用顺序图? • 如何对一个对象创建建模? • 如何使用UML2.0中新添加的有关顺序图的内容? • 顺序图在UML大图中应该处于什么位置

  3. 什么是顺序图? • UML可让你方法视野,显示出一个对象如何与其它对象交互。 • 在这个“放大”中,要包含的重要的一维:时间 • 顺序图的关键思想是对象之间的交互是按照特定的顺序发生的。

  4. 顺序图:对象

  5. 顺序图:消息

  6. 顺序图:消息

  7. 顺序图:消息

  8. 顺序图:时间

  9. 顺序图的图符集

  10. 案例:汽车和车钥匙

  11. 汽车和车钥匙:类图 通过添加关键字可以把信号建模成一个类

  12. 汽车和车钥匙:顺序图 匿名对象 If条件表示方式 根据一个类图定义的作用域的交互建模

  13. 案例:饮料销售机

  14. 饮料销售机:类图

  15. 饮料销售机:顺序图 根据用例的某个场景建立交互( “Buy Soda” )

  16. 需要找零的情况

  17. 饮料机找不出零钱的情况

  18. 一般顺序图 • 实例顺序图(instance sequence diagram):把一个场景用顺序图描述出来。 • 一般顺序图(generic sequence diagram):如果绘制顺序图时考虑所有的场景,这样所创建的就是一个一般顺序图

  19. 保护条件 场景结束

  20. 在消息序列中创建对象实例 • 几年前,通信业巨头(?)爱立信公司展示了一项技术,顾客可以使用他们的手机在饮料机中购买饮料。 • 增加了以下功能:为顾客和饮料机之间的交互创建一个事务记录,并通过该事务记录从购买饮料的顾客的信用卡中收费 如何对这种交互过程建立顺序内容?

  21. 手机购买饮料的类图 小bug

  22. 手机购买饮料的时序图 创建对象,根据该对象被创建的时间,在顺序图的垂直方向上定位它

  23. 对象的销毁 请完善上一页的TransactionRecord的消息过程

  24. Thanks * Some materials come from Bernd Bruegge & Allen H. Dutoit’s PPT and others from Internet

More Related