10
Chapter 10 系系系

Chapter 10

Embed Size (px)

DESCRIPTION

Chapter 10. 系统顺序图. 现在的位置. 目标. 确定系统事件 为用例场景确定系统顺序图. 什么是系统顺序图 (SSD). 系统事件: 外部输入的,驱动系统的事件称为系统事件。 外界通过系统事件对系统进行交互,在这个意义上,系统顺序图是以黑盒的方式来描述系统。 对于用例的一个特定的场景,系统顺序图用于表示外部参与者产生的事件,及其发生的顺序。. 示例. UML 的顺序图与系统顺序图 (SSD). UML 中定义的顺序图,而没有所谓的系统顺序图。 用“系统”来修饰顺序图强调了该图对于我们的系统而言是一个黑盒模型。 SSD 和用例之间的关系 - PowerPoint PPT Presentation

Citation preview

Page 1: Chapter 10

Chapter 10

系统顺序图

Page 2: Chapter 10

现在的位置

Page 3: Chapter 10

Operation: enterItem(…)

Post-conditions:- . . .

Operation Contracts

Sale

date. . .

SalesLineItem

quantity

1..*1 . . .

. . .

Domain Model

Use-Case Model

Design Model: Register

enterItem(itemID, quantity)

: ProductCatalog

spec = getProductSpec( itemID )

addLineItem( spec, quantity )

: Sale

Require-ments

Business Modeling

Design

Sample UP Artifact Relationships

: System

enterItem(id, quantity)

Use Case Text

System Sequence Diagrams

makeNewSale()

system events

Cashier

Process Sale

: Cashier

use case

names

system operations

Use Case Diagram

Vision

SupplementarySpecification

Glossaryparameters and

return value details

starting events to design for

Process Sale

1. Customer arrives ...2. Cashier makes new sale.3. ...

Page 4: Chapter 10

目标确定系统事件为用例场景确定系统顺序图

Page 5: Chapter 10

什么是系统顺序图 (SSD)系统事件:

外部输入的,驱动系统的事件称为系统事件。 外界通过系统事件对系统进行交互,在这个意义上,系统顺序图是以黑盒的方式来描述系统。

对于用例的一个特定的场景,系统顺序图用于表示外部参与者产生的事件,及其发生的顺序。

Page 6: Chapter 10

示例

: Cashier :System

Simple cash-only Process Sale scenario:

1. Customer arrives at a POS checkout with goods and/or services to purchase.2. Cashier starts a new sale.3. Cashier enters item identifier.4. System records sale line item and presents item description, price, and running total. Cashier repeats steps 3-4 until indicates done.5. System presents total with taxes calculated.6. Cashier tells Customer the total, and asks for payment.7. Customer pays and System handles payment....

enterItem(itemID, quantity)

endSale

makePayment(amount)

description, total

total with taxes

change due, receipt

makeNewSale

[ more items ]loop

Process Sale Scenario

Page 7: Chapter 10

UML的顺序图与系统顺序图(SSD) UML中定义的顺序图,而没有所谓的系统顺序图。用“系统”来修饰顺序图强调了该图对于我们的系统而言是一个黑盒模型。

SSD和用例之间的关系 SSD展示了用例中一个场景的系统事件,因此他是从对用例的考察中产生的。

SSD也同样可以用来阐述系统之间的协作,例如NextGen POS和外部信用卡支付授权系统之间的协作。

Page 8: Chapter 10

系统顺序图的组成

enterItem(itemID, quantity)

:System: Cashier

endSale

makePayment(amount)

a UML loop interaction frame, with a boolean guard expression

external actor to system

Process Sale Scenario

system as black box

the name could be "NextGenPOS" but "System" keeps it simple

the ":" and underline imply an instance, and are explained in a later chapter on sequence diagram notation in the UML

a message with parameters

it is an abstraction representing the system event of entering the payment data by some mechanism

description, total

return value(s) associated with the previous message

an abstraction that ignores presentation and medium

the return line is optional if nothing is returned

total with taxes

change due, receipt

makeNewSale

[ more items ]loop

Page 9: Chapter 10

如何为系统事件和操作命名

enterItem(itemID, quantity)

scan(itemID, quantity)

: Cashier

worse name

better name

:System

系统事件应该用抽象层次比较高的词语来表达,避免使用物理级别的术语。

Page 10: Chapter 10

SSD与词汇表 SSD中所示的元素,如操作名称、参数和返回数据,通常非常简洁,同时也是非常关键的。需要对这些元素加以适当的解释以便在设计是能够明确地知道输入了什么,输出了什么

词汇表是详细描述这些元素的最佳选择