Sie sind auf Seite 1von 14

Use Cases

& Use Case Diagrams

Chapter 3

1
Outline
 Use Case – defined

 Techniques for Identifying Use Cases


 User Goal
 Event Decomposition

 UML's Use Case Diagram

2
Use Case - Defined
 Use case - an activity that the system performs
 usually in response to a request by a user
 Functional Requirements
 Verb + Noun
– Place order
– Issue complaint

 Techniques to Identify use cases:


 User Goal
 Event Decomposition

3
Identifying Use Cases- User Goal Technique
 Ask the users what they need the system to do

• Identify the users


• Interview them
• Create the list of use cases
 Some users may need the same use case
 Watch out for duplicates, inconsistencies
• Verify the list with the users 4
Identifying Use Cases- Event Decomposition
 Identify the events that occur to which the system must respond.
 Event - an occurrence at a specific time & place which needs to be remembered
 Use Case - what the system does when the event occurs

 Prior Conditions
& Events

5
Identifying Use Cases- Event Decomposition
 Types of Events
 External
 Temporal
 State

6
UML's
Use Case Diagram

7
UML - The Unified Modeling Language
 An Object-Oriented modeling language
 "3 Amigos" - Booch, Rumbaugh, and Jacobson
 Adopted & now managed by OMG (Object Management Group)

 Models both structure & behavior

 Structure diagrams
• Class diagram, Component diagram, Deployment diagram,
Object diagram, Package diagram, etc.

 Behavior diagrams
• Activity diagram , Use Case diagram , Sequence diagram,
State machine, Communication diagram, etc.
8
Use Case Diagram

 A UML diagram depicting the  Use Case - an activity that the system
relationship between actors & use cases performs

 Defines Scope/Functional Requirements


 Symbols
 Automation Boundary - The boundary  Association - depicts a usage relationship
between the software and the actors of between an actor and a use case
the system

• <<includes>> association - Used


 Actor - Anyone or thing that interacts when one use case (base) includes
with the system another use case (the inclusion use
case)<<includes>> <<extends>>

<<uses>>

Customer Billing Time


<<system>>
9
Use Case Diagram - Example

• Prefer "Place an order"


10
Use Case Diagram - Practice

ATM System

Withdraw
cash

Customer

11
Use Case Diagram - Example

Create
new order

<<includes>>
<<includes>>

Lookup
item
availability
Customer Validate
customer Sales
<<includes>> account clerk

<<includes>>

Update
order

Reuse!

12
"Withdraw Cash” Use Case – i.e. scenario
Withdraw
cash
Customer

Customer ATM Bank

13
Special Use Cases
 State-driven use cases
• e.g. Polling, Monitoring, Notifications

Reorder
Employee Stock

 Time-based Use Cases

Generate
<<Time>> Payroll

14

Das könnte Ihnen auch gefallen