COMP1531
🐶 Software Engineering
7.2 - Requirements - Use Cases
Author: Hayden Smith 2021
In this lecture
Why?
- Requirements can be very human, and express complex flows. We need ways to model this.
What?
- Use Cases
- Use Case Representations
Use cases
- Represent a dialogue between the user and the system, with the aim of helping the user achieve a business goal
- The user initiates actions and the system responds with reactions
- They consider systems as a black box, and are only focused on high level understanding of flow
Representations
Generally you can represent use cases as:
- Informal list of steps (written)
- Diagramatic (visual)
There is a range of different approaches that can be taken too, e.g. Cockburn style (not required reading)
Use-case Diagrams
Use-case written form
MAIN SUCCESS SCENARIO
Step 1. ATM asks customer for pin
Step 2. Customer enters pin
Step 3. ATM asks bank to verify pin and account
Step 4. Bank informs ATM of validity and balance of account
Step 5. ATM asks customer what action they wish to take
Step 6. Customer asks to withdraw an amount of money
Step 7. ATM Dispenses money to customer
Step 8. ATM informs bank of withdrawal
5
Use-case (Background)
- Use Case: Withdraw Money
- Goal in Context: Customers need to withdraw money from their accounts without entering the bank
- Scope: ATM, banking infrastructure
- Level: Primary Task
- Preconditions: The customer has an account with the bank
- Success End Condition: The customer has the money they needed to withdraw
- Failed End Condition: The customer has no money
- Primary Actor: Customer
- Trigger: Customer puts card into ATM
Template for background
- Use Case: <the name should be the goal as a short active verb phrase>
- Goal in Context: <a longer statement of the goal, if needed>
- Scope: <what system is being considered black-box under design>
- Level: <one of: Summary, Primary task, Subfunction>
- Preconditions: <what we expect is already the state of the world>
- Success End Condition: <the state of the world upon successful completion>
- Failed End Condition: <the state of the world if goal abandoned>
- Primary Actor: <a role name for the primary actor, or description>
- Trigger: <the action upon the system that starts the use case, may be time event>
In More Depth
- Can be used to model variations in steps (e.g. Insufficient funds)
- If you wish to know more about use cases, see here:
Feedback
COMP1531 21T3 - 7.2 - SDLC Requirements - Use Cases, user Stories
By haydensmith
COMP1531 21T3 - 7.2 - SDLC Requirements - Use Cases, user Stories
- 520