COMP1531
7.2 - SDLC Requirements - Use Cases
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 the system a black box
Example
Representations
- Informal list of steps
- Use-Case diagrams
- Cockburn style (not required reading)
Initial template
- 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>
ATM Example
- 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
Steps taken
MAIN SUCCESS SCENARIO
<put here the steps of the scenario from trigger to goal delivery, and any cleanup after>
<step #> <action description>
ATM Example
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
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:
COMP1531 21T1 - 7.2 - SDLC Requirements - Use Cases
By haydensmith
COMP1531 21T1 - 7.2 - SDLC Requirements - Use Cases
- 680