Creating Use Cases Overview n n N ObjectOriented
Creating Use Cases
Overview n n N Object-Oriented Analysis and Design Use cases describe domain processes in a structured prose format. We explore basic skills. l Definitions. l Notation. l Guidelines. l Practice. 2
Object-Oriented Analysis and Design Objectives n n Read and create high-level and expanded format use cases. Distinguish between essential and real use cases. 3
Object-Oriented Analysis and Design Use Cases n Describe the sequence of events of an actor using a system to complete a process. 4
Object-Oriented Analysis and Design A High-Level Use Case High level use cases briefly describe major processes in the organization. Name: Borrow Resources Actors: Patron (initiator), Librarian Description: The use case begins when the Patron arrives at the check-out with books and videos to borrow and submits them to the Librarian, who records the resources borrowed. The Patron then leaves with the resources. 5
Object-Oriented Analysis and Design Actors n n An actor in a use case is an external agent that uses or interacts with the system. There is one initiator actor and possibly several participating actors. 6
Object-Oriented Analysis and Design Actors can be: n n Roles of humans. Example: A Patron. Other computer systems. Example: The Visa network. 7
Object-Oriented Analysis and Design Use Case Diagrams 8
Object-Oriented Analysis and Design Sample High-Level Primary Use Cases n Name: Add Resources. n Actors: Librarian. n Description: The use case begins when the Librarian receives new resources (books and videos) to add to the catalog. The title, call number, and other information are recorded. Then the resources are placed on a shelf organized by resource type and call numbers. 9
Object-Oriented Analysis and Design Sample High-Level Primary Use Cases Other possible use cases. n Return a Resource. n Delete a Resource. n Notify Overdue Patrons. n Collect Fines. 10
Object-Oriented Analysis and Design Importance Levels of Use Cases 11
Object-Oriented Analysis and Design Abstraction Levels of Use Cases 12
Object-Oriented Analysis and Design Essential versus Real Use Cases 13
Object-Oriented Analysis and Design Expanded Format Use Cases n Describe the use case in greater detail. n Can be written essential or real. n Have the following components: l Name. l Starts with a verb. l Description. l From the high-level use case. l Actors. l Initiator and participants from high-level use case. l Type. l If decomposed, then super / sub (abstract). l Also, primary / secondary, and essential / real. 14
Object-Oriented Analysis and Design Expanded Format Use Cases (continued) n Have the following components (continued): l Cross-references. l Related use cases and system functions. l Preconditions. l Assumptions that must hold true. l Typical Course of Events. l Most important section describes regular flow of events. l Alternatives. l Exceptional alternatives that might arise. 15
Object-Oriented Analysis and Design Expanded Use Case — Example n Name: n Description: n Actors: Patron (initiator), Librarian. n Type: Primary, essential. n n Borrow Resources. (As in high-level use case. ) Cross-references: R 1. 3, R 3. 1. Preconditions: System functions R 1. 1, R 1. 2, Patron has a library card. 16
Object-Oriented Analysis and Design Typical Course of Events 17
Object-Oriented Analysis and Design Typical Course of Events (continued) n Alternatives. l Alternative at 4: If the Patron card is invalid, do not allow borrowing. l Alternative at 5: If the Resource is missing a call number, set it aside for repair and do not allow borrowing. 18
Object-Oriented Analysis and Design Use-Case Miscellany n n The first line of a use case course of events should describe the event that starts the use case. l Example: This use case begins when the <actor> <generates an input event> Start the use-case name with a verb. l Purchase … l Borrow … 19
- Slides: 19