Use Cases and Scenarios
Use Case Diagram Examples
2 What is a Use Case?
A use-case captures some user visible function
This may be a large or small function
Depends on the level of detail in your modeling effort
Examples
Format a document
Request an elevator
Use Cases and Scenarios March 2019
3 User Goals vs User Interactions
Define a style Format a document
Change a style Ensure consistent formatting of
Copy a style from one document two documents
to the next
user interactions Things the
user goal: Something the user user does to the system to
wants to achieve achieve the goal
Understand what the system shall do: Understand how the user will achieve
Capture the user goals the goals: Capture user interactions or
sequences of user interactions
Use Cases and Scenarios March 2019
4 Point of Sales Terminal (POST) Example
Adapted from Larman “Applying UML and Patterns”
Use Cases and Scenarios March 2019
5 POST
Adapted from Larman “Applying UML and Patterns”
Use Cases and Scenarios March 2019
6 Use Case Description
Use case: Buy Item
Actors: Customer (initiator), Cashier
Type: Primary and essential
Description: The Customer arrives at the checkout with items to purchase. The Cashier records the purchase items and
collects a payment. On completion the Customer leaves with the items
Entry Condition: Customer present and cash in hand. Item selected
Exit Condition: Customer has item
Flow: Customer selects item
Customer Checkout
Cost calculated
bill generated
payment
Use Cases and Scenarios March 2019
7 When to use Use-Cases?
In short, always!!!
Use-Cases is a powerful tool to understand
Who your users are (including interacting systems)
What functions the system shall provide
How these functions work at a high level
Use Cases and Scenarios March 2019