UML sofeware engineer
10/4/2020 1
Lesson 11
Use Case Alternative Courses
10/4/2020 2
Use Case Alternative Courses
Need for alternative courses
Errors
Sections
10/4/2020 3
Need for Alternative Courses
Nothing works as it is suppose to Customers change their mind
Human errors are easily made
Transactions can be done different ways Pay by Check Pay by Cash Pay by Credit Card
10/4/2020 4
Need for Alternative Courses
There are really two types: Alternative courses that are user problems
Customer does not have enough cash Customer number does not exist
Alternative courses that are input errors Credit card is invalid Item is not in stock Customer number is entered in error
10/4/2020 5
Errors
Recall use case for Buy Items: 2. The customer gives the upc to the
system 3. Displays the price and running total
Alternative Courses: Line 2: If the upc is invalid, display that it is
invalid and ask cashier for another upc
10/4/2020 6
Errors
Recall use case for Buy Items:
6. The customer makes a payment 7. Displays the balance due
Alternative Courses: Line 6: If the customer has insufficient
cash is invalid, cancel the sale
10/4/2020 7
Errors
Recall use case for Rent Car:
2. The customer gives dates and times needed with type of car 3. Displays what is available with the price
Alternative Courses: Line 2: If no car is available, thank the
customer for considering us
10/4/2020 8
Errors
Recall use case for Rent Car:
6. The customer makes a payment 7. Prints the contract and the receipt
Alternative Courses: Line 6: If the customer’s payment is
unsatisfactory, cancel the rental
10/4/2020 9
Sections
Sections are a convenient way to handle alternative actions
Sections are a segment of a use case executed out of sequence
10/4/2020 10
Sections
Recall use case for Buy Items:
6. The customer makes a payment
is replaced by
6. Customer chooses payment type
10/4/2020 11
Sections
Section: Pay by Cash
1. The customer makes a payment
2. Displays the balance due
10/4/2020 12
Sections
Section: Pay by Check
1. The customer submits check and personal picture identification
2. Generates a check verification request
3. Receives check approval
4. Displays check is okay or not okay
10/4/2020 13
Sections
Recall use case for Rent Car:
2. The customer gives dates and times needed with type of car
2. Customer chooses return at place of rental (return) or another city (one way)
10/4/2020 14
Sections
Section: Return Car Rental
1. The customer gives dates and times needed with type of car
2. Displays what is available with the price
10/4/2020 15
Sections
Section: One Way Car Rental
1. The customer gives dates, times, and type of car If a car is available
1. The customer gives the city name where the car is to be returned to 2. Displays what is available with the price
10/4/2020 16
Summary
Use Cases always contain errors
Sections are a convenient way to handle multiple choices
Usually errors are added to use cases in a second writing
This allows users to study the use case while it is simple before complexities are added
- Lesson 11
- Use Case Alternative Courses
- Need for Alternative Courses
- Need for Alternative Courses
- Errors
- Errors
- Errors
- Errors
- Sections
- Sections
- Sections
- Sections
- Sections
- Sections
- Sections
- Summary