♦ Use Case -What are the domain processes ? Use Case Diagram

16
Use Case -What are the domain processes ? Use Case Diagram Conceptual Model -What are the domain concepts, terms ? Class Diagram (conceptual) classes, associations, attributes 1 Summary from previous lectures

description

Summary from previous lectures. ♦ Use Case -What are the domain processes ? Use Case Diagram ♦ Conceptual Model -What are the domain concepts, terms ? Class Diagram ( conceptual ) classes , associations, attributes. Fig 10.1 Summary from previous lectures. System Sequence Diagrams. - PowerPoint PPT Presentation

Transcript of ♦ Use Case -What are the domain processes ? Use Case Diagram

Page 1: ♦  Use  Case -What are the domain processes ? Use Case Diagram

♦ Use Case -What are the domain processes ?• Use Case Diagram

♦ Conceptual Model -What are the domain concepts, terms ?

• Class Diagram (conceptual)• classes, associations, attributes

1

Summary from previous lectures

Page 2: ♦  Use  Case -What are the domain processes ? Use Case Diagram

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. ...

Fig 10.1 Summary from previous lectures

Page 3: ♦  Use  Case -What are the domain processes ? Use Case Diagram

System Sequence Diagrams

Chapter 10Applying UML and Patterns

-Craig Larman

Page 4: ♦  Use  Case -What are the domain processes ? Use Case Diagram

Introduction Class diagrams represent static relationships.

What about modeling dynamic behavior? Interaction diagrams(Sequence and

communication diagrams) model how groups of object collaborate to perform some behavior• Typically captures the behavior of a single

use case

Today´s lecture

Page 5: ♦  Use  Case -What are the domain processes ? Use Case Diagram

System Sequence Diagram (SSD)For a use case scenario, an SSD shows: The System (as a black box) The external actors that interact with System The System events that the actors generate SSD shows operations of the System in

response to events , in temporal order Develop SSDs for the main success scenario of

a selected use case, then frequent and salient alternative scenarios

:System

Page 6: ♦  Use  Case -What are the domain processes ? Use Case Diagram

Identifying the right Actor

In the “Process Sale” example, does the

customer interact directly with the POS system?

Who does?

Cashier interacts with the system directly

Cashier is the generator of the system events

Page 7: ♦  Use  Case -What are the domain processes ? Use Case Diagram

Fig 10.2 SSD for a Process Sale scenario

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 8: ♦  Use  Case -What are the domain processes ? Use Case Diagram

Relationship between SSD and Use case

System Sequence Diagrams :♦ Draw a line representing the system as a black box.♦ Identify each actor that directly operates on the system. Draw a line for each such actor.♦ From expanded use case identify system events that each actor generates.Illustrate them.♦ Optionally include use case text on left.

8

Page 9: ♦  Use  Case -What are the domain processes ? Use Case Diagram

Fig 10.3 Relationship between SSD and Use case

Page 10: ♦  Use  Case -What are the domain processes ? Use Case Diagram

Naming System events & operations

System events and associated system operations

should be expressed at the level of intent.

Rather than physical input medium or UI widget

Start operation names with verb (from use case)

Which is better, scanBarCode or enterItem?

Page 11: ♦  Use  Case -What are the domain processes ? Use Case Diagram

Fig 10.4 : Naming System events & operations

enterItem(itemID, quantity)

scan(itemID, quantity)

: Cashier

worse name

better name

:System

Capture the intent of the operation while remaining abstract

Page 12: ♦  Use  Case -What are the domain processes ? Use Case Diagram

Fig 10.5 SSD for ”play Monopoly” Game scenario

12

Page 13: ♦  Use  Case -What are the domain processes ? Use Case Diagram

SSDs and the Glossary in parallel Why is updating the glossary important

when developing the SSD? New terms used in SSDs may need

explanation, especially if they are not derived from use cases

A glossary is less formal, easier to maintain and more intuitive to discuss with external parties such as customers

Page 14: ♦  Use  Case -What are the domain processes ? Use Case Diagram

Why Draw SSD? Important to know the system events.

Sequence diagrams help the designer to

determine how the system will react to each event.

Need to design the software to handle these

events and execute a response.

Page 15: ♦  Use  Case -What are the domain processes ? Use Case Diagram

Example 1

15

Page 16: ♦  Use  Case -What are the domain processes ? Use Case Diagram

Questions ?

16