Use cases In general, a use case should cover the full sequence of' steps from the beginning of a task until the end a use case should describe the user 's interaction with the system -not the computations the system performs a use case should be written so as to be as independent as possible from any particular user interface design a use case should only include actions in which the actor interacts with the computer www.oseng.com O Lethbridge/Laganiere 2001 Chapter 7: Focusing on Users and Their Tasks 6
© Lethbridge/Laganière 2001 Chapter 7: Focusing on Users and Their Tasks 6 Use cases • In general, a use case should cover the full sequence of steps from the beginning of a task until the end. • A use case should describe the user’s interaction with the system ... —not the computations the system performs. • A use case should be written so as to be as independent as possible from any particular user interface design. • A use case should only include actions in which the actor interacts with the computer
Scenarios a scenario is an instance of a use case It expresses a specific occurrence of the use case -a specific actor at a specific time -with specific data www.oseng.com O Lethbridge/Laganiere 2001 Chapter 7: Focusing on Users and Their Tasks
© Lethbridge/Laganière 2001 Chapter 7: Focusing on Users and Their Tasks 7 Scenarios A scenario is an instance of a use case • It expresses a specific occurrence of the use case —a specific actor ... —at a specific time ... —with specific data
How to describe a single use case A Name: Give a short, descriptive name to the use case B. Actors: List the actors who can perform this use case C. Goals: Explain what the actor or actors are trying to achieve D. Preconditions: State of the system before the use case E. Description: Give a short informal description F. Related use cases G Steps: Describe each step using a 2-column format H. Postconditions: State of the system in following completion www.oseng.com O Lethbridge/Laganiere 2001 Chapter 7: Focusing on Users and Their Tasks 8
© Lethbridge/Laganière 2001 Chapter 7: Focusing on Users and Their Tasks 8 How to describe a single use case A. Name: Give a short, descriptive name to the use case. B. Actors: List the actors who can perform this use case. C. Goals: Explain what the actor or actors are trying to achieve. D. Preconditions: State of the system before the use case. E. Description: Give a short informal description. F. Related use cases. G. Steps: Describe each step using a 2-column format. H. Postconditions: State of the system in following completion
Use case diagrams Register in Course Add Course Offering Registrar Actor Add course Enter Grade for Course Student Find information about cours Professor actor www.oseng.com O Lethbridge/Laganiere 2001 Chapter 7: Focusing on Users and Their Tasks
© Lethbridge/Laganière 2001 Chapter 7: Focusing on Users and Their Tasks 9 Use case diagrams Register in Course Add Course Add Course Offering Student Find information about course Professor Actor Registrar Actor Enter Grade for Course
Extensions Used to make optional interactions explicit or to handle exceptional cases By creating separate use case extensions, the description of the basic use case remains simple a use case extension must list all the steps from the beginning of the use case to the end -including the handling of the unusual situation www.oseng.com O Lethbridge/Laganiere 2001 Chapter 7: Focusing on Users and Their Tasks
© Lethbridge/Laganière 2001 Chapter 7: Focusing on Users and Their Tasks 10 Extensions • Used to make optional interactions explicit or to handle exceptional cases. • By creating separate use case extensions, the description of the basic use case remains simple. • A use case extension must list all the steps from the beginning of the use case to the end. —Including the handling of the unusual situation