requirements use cases
play

Requirements Use Cases Software Lifecycle Activities Software - PDF document

Requirements Engineering Requirements Use Cases Software Lifecycle Activities Software Design Requirements Analysis Implementation System Engineering System Engineering Testing Eunjee Song Deployment Computer Science Department


  1. Requirements Engineering Requirements Use Cases  Software Lifecycle Activities Software Design Requirements Analysis Implementation System Engineering System Engineering Testing Eunjee Song Deployment Computer Science Department Evolution Baylor University Eunjee Song Use Cases-1 Eunjee Song Use Cases-2 Requirements Use Cases What is use case modeling?  A use case is the specification of a set of  use case model: a view of a system actions performed by a system, which that emphasizes the behavior as it yields an observable result that is, appears to outside users. A use case typically, of value for one or more actors or model partitions system functionality p y y other stakeholders of the system other stakeholders of the system – UML UML into transactions (‘use cases’) that are Specification meaningful to users (‘actors’). Eunjee Song Eunjee Song Use Cases-3 Use Cases-4 Use Cases in UML 2.0 Use Case Modeling: Core Elements Construct Description Syntax  Use cases are associated with subjects use case A sequence of actions, including variants, that a system (or other  A subject can be a system, a subsystem in a entity) can perform, interacting with UseCaseName system, or a class actors of the system. actor A role played by an entity that  A use case describes interactions between A use case describes interactions between interacts with the subject (e.g., interacts with the subject (e.g., system, subsystem, class). users (clients) and a subject ActorName System/sub Represents the boundary between  At the requirements level the subject is the ject the subject and the actors who system under development boundary interact with the subject. Eunjee Song Eunjee Song Use Cases-5 Use Cases-6 CSI3372 1

  2. Use Case Diagram Depicting actors system boundary communication NextGen POS Process Sale alternate notation for a computer Customer Payment system actor Authorization Service Handle Returns «actor» actor Tax Calculator Cashier «actor» Cash In Accounting System Manager «actor» «actor» Analyze Activity HR System Sales Activity System Manage Security Payment Authorization Service System Manage Users Administrator use case . . . Eunjee Song Use Cases-7 Eunjee Song Use Cases-8 Use Cases as requirements Simple Use Case example Actor Inputs System Response  Use cases can be used to capture functional 1. Customer submits identification 2. If customer is authenticated, requirements information then request rental items  System attributes associated with a system 3. Customer submits items to be 4. Display calculated price. rented operation can be documented in a use case 5. Customer pays. 6. Inform customer that  Not all requirements can be captured by use payments is authorized cases  System attributes that span use cases are documented as supplementary requirements Eunjee Song Eunjee Song Use Cases-9 Use Cases-10 Use Case instance (scenario) Actor types  A scenario is a particular sequence of  Primary : actor whose goal is actions in a use case. accomplished by the use case  A use case is a related set of scenarios that yields  Supporting : actor that provides services an observable result of value to a particular actor to the system y  A use case instance is an execution of a A i t i ti f  E.g., authorization service scenario.  Offstage : an actor that has an interest in  Often use case instance and scenario are used the use case but is not primary or synonymously in informal discussions. supporting  E.g., regulating agency Eunjee Song Eunjee Song Use Cases-11 Use Cases-12 CSI3372 2

  3. Levels of rigor Essential vs. Concrete Use Cases  Brief : One paragraph summaries of  Essential Use Cases describe functionality functionality in implementation independent terms  Requirements level use cases must be essential  Casual : Multiple paragraphs that cover multiple scenarios multiple scenarios  Concrete Use Cases describe external  Concrete Use Cases describe external functionality in system dependent terms  Fully-dressed (Detailed): Structured, detailed description of scenarios  Use cases can be used during design to document externally observable behavior of subsystems Eunjee Song Use Cases-13 Eunjee Song Use Cases-14 Requirements Use Case template Analysis Use Case template – cont’d Pre Enter the condition that must be true when the main flow is initiated. This should reference the Use Case EU-xxxx : Indicates an essential use case, i.e., a use case that describes activity in system independent condition: conceptual model. Number: terms Use Case Enter name of Use Case. Name: Overview: Describe the purpose of the Use Case and give a brief description. Flow: Main Flow: Steps should be numbered. Type: Enter Use Case priority (primary, secondary, optional) Subflows: Break down of main flow steps Actors: List all actors that participate in this Use Case. Indicate the actor that initiates the use case by placing “initiator” in brackets after the actor name. Also, indicate primary actors by placing “primary” in f , p y y p g p y brackets after actor name. Alternate Flows: Include the post condition for each alternate flow if different from the main flow. Properties: Performance: Post Enter the condition that must be true when the main flow is completed. This should reference Security: Condition: the conceptual model. Include the following information in this section: Other: Cross References to other Use Cases or textual requirements that relate to this Use Case. References: Eunjee Song Eunjee Song Use Cases-15 Use Cases-16 Goals and Use Cases Determining Use Case scope  Interactions usually take place to satisfy  A use case should describe end-to-end system goals. functionality  Should describe a task carried in response to an  Identifying goals is important because it can event generated by an actor that produces a g y lead to consideration of more effective lead to consideration of more effective result of value to a subset of its actors and leaves alternatives. the system in a stable state (one in which it is not  For each interaction ask “why?” - the answer waiting for a restricted set of inputs) should lead to a system goal. Eunjee Song Eunjee Song Use Cases-17 Use Cases-18 CSI3372 3

  4. Identifying Use Cases and Actors Developing Use Cases  Approaches to identifying use cases  Scope system and identify primary actors that interact with the system  Actor-first : Identify actors first and consider the ways they interact with the system  Determine goals of primary actors (can be documented in an Actor-Goal list) )  Operation-first : Identify system-level operations p y y p and then identify actors that interact with  For each actor, consider the ways that the operations actor typically interacts with the system to  Event-first : Identify external events and develop accomplish goals use cases that handle the events  Consider exceptional behaviors Eunjee Song Use Cases-19 Eunjee Song Use Cases-20 Use Case Exercise 1 Use Case Exercise 1 – Use Case University library system requirements Diagram of University Library System Books and journals – the library contains books and journals. It may have several copies of a given book. Some of the books are for short term loans only. All other books may be borrowed by any library member for three weeks. Only members of staff may borrow journals. Members of Borrow journal the library can normally borrow up to six items at a time, but members of staff can borrow up to 12 items at a time. New books and journals Book Borrower Journal Borrower Reserve book arrive regularly, and old ones are sometimes disposed of. The current Return journal year’s journals are sent away to be bound into volumes at the end of each year. Borrow copy of book Borrow copy of book Borrowing – it is essential that the system keeps track of when books and journals are borrowed and returned. The new system should also Browse Return copy of book Browser produce reminders when a book is overdue. There may in future be a requirement for uses to be able to extend the loan of a book if it is not reserved. Extend loan Browsing – this system should allow users to search for a book on a Update catalog Librarian particular topic, by a particular author, etc., to check whether a copy of the book is available for loan and, if not ,to reserve the book. Anybody can browse in the library. P. Stevens, R. Pooley. Using UML: Software Engineering with Objects and Components. Addison-Wesley, 2000. Eunjee Song Eunjee Song Use Cases-21 Use Cases-22 Use Case Exercise 2 – Use Cases Use Case Exercise 3 - Use Cases  Construct an essential use case that represents  Construct essential use cases that represent borrowing a copy of book from the university returning a copy of book to the university library in a brief level rigor. library in each of the following three levels rigor: Borrow copy of book  Brief A BookBorrower presents a book The system checks that the A BookBorrower presents a book. The system checks that the potential borrower is a member of the library, and that s/he does  Casual not already have a maximum permitted number of books on  Fully-dressed loan. This maximum is six unless the member is a staff member in which case it is twelve. If both checks succeed, this system records that this library member has this copy of the book on loan. Eunjee Song Eunjee Song Use Cases-23 Use Cases-24 CSI3372 4

Recommend


More recommend