1 Use Cases 2 CSSE 371 Software Requirements and Specification Mark Ardis, Rose-Hulman Institute September 20, 2004
2 Outline Computing in 1968 Template for use cases Extending use cases Including use cases
3 Computing in 1968
4
5
6
7 Doug Engelbart Video (see link from ANGEL course page)
8 Refining Use Cases Describe sequences of events for flows Describe pre-conditions Describe post-conditions Fill in special requirements
9 Use Case Template A. Name B. Brief description C. Actors D. Basic flow E. Alternate flows F. Pre-conditions G. Post-conditions H. Special requirements
10 Microwave Example User Cook Food
11 Cook Food Use Case 1/4 A. Name: Cook Food B. Brief description: User places food in microwave and cooks it for desired period of time at desired power level. C. Actors: User
12 Cook Food Use Case 2/4 D. Basic flow: 1. User opens door and places food in unit 2. User enters time for cooking 3. User pushes start button 4. Unit cooks food 5. Unit beeps
13 Cook Food Use Case 3/4 E. Alternate flows 1. User cancels time before starting 2. User cancels cooking before finished 3. User selects reduced power level before pushing start button
14 Cook Food Use Case 4/4 F. Pre-conditions Unit is plugged in Unit is in ready state G. Post-conditions Food is cooked or user cancelled operation H. Special requirements Timer should display remaining time to finish while cooking Default power setting should be "high"
15 Extending Use Cases Extend an existing use case instead of redefining it
16 Microwave Extension User Cook FoodSlice Food >
17 Including Use Cases Frequent sequences of events may be defined as use cases Including a use case is like calling a subroutine
18 Microwave Inclusion User Cook FoodSet Timer >
19 Cook Food Inclusion D. Basic flow: 1. User opens door and places food in unit 2. User performs Set Timer use case 3. User pushes start button 4. Unit cooks food 5. Unit beeps