1 / 20
文档名称:

华师大面向对象程序设计-Lec10 中的顺序图.ppt

格式:ppt   大小:656KB   页数:20页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

华师大面向对象程序设计-Lec10 中的顺序图.ppt

上传人:s1188831 2017/8/20 文件大小:656 KB

下载得到文件列表

华师大面向对象程序设计-Lec10 中的顺序图.ppt

相关文档

文档介绍

文档介绍:Object oriented Analysis &Design 面向对象分析与设计 System Sequence Diagram Operation Contract
Presented by: Xiaohong Chen
Outline
System sequence diagram
Identify system events.
Create system sequence diagrams for use case scenarios.
Operation contract
2
3
(Ch10,15 ) System Sequence Diagram
SSD:
System Sequence Diagram
What is SSD?
A SSD is a picture that shows, for one particular scenario of a use case, the events that external actors generate, inter-system events , and their order
All systems are treated as a black box;
the emphasis of the diagram is events that cross the system boundary from actors to systems
System Event
external input events
actor generates events to a system
system operation
to handle the system event , for example
when a cashier enters an item's ID, the cashier is requesting the POS system to record that item's sale (the enterItem event). That event initiates an operation upon the system.
4
(Ch10,15 ) System Sequence Diagram
5
(Ch10,15 ) System Sequence Diagram
Cf: SSD & SD
SSD: to emphasize to treat systems as black boxes.
SD will be used to illustrate the design of interacting software objects to fulfill work
SSD and Use case
it is generated from inspection of a use case
6
Fig 10-3
7
Fig 10-5
8
SD example,fig15-3
初学建模者没有对交互图给予足够的重视
Above sequence diagram is read as follows:
The message makePayment is sent to an instance of a Register. The sender is not identified.
The Register instance sends the makePayment message to a Sale instance.
The Sale instance creates an instance of a Payment.
9
Example
public class A {
private B myB = new B();
public void doOne() {
();
();
}
// …
}
public class B {
….
public void doTwo() {
….
}
public void doThree(){
……;
}
// …
}
What class A&B looks like? (write pseudocode )
10
SD review
Fig 15-5 Lifeline boxes to show participants in interactions.