Presentation is loading. Please wait.

Presentation is loading. Please wait.

Capturing and Exploring Requirements with Use Cases and UML Models

Similar presentations


Presentation on theme: "Capturing and Exploring Requirements with Use Cases and UML Models"— Presentation transcript:

1 Capturing and Exploring Requirements with Use Cases and UML Models
Eddie Burris UMKC

2 Writing Use Cases–Motivation
Writing use cases supports requirements activities: Method of recording functional requirements. Readable by end users but also detailed enough for programmers to implement and testers to write test cases. Systematic and semi-formal representation helps ensure requirements are complete and well understood.

3 Visual Modeling–Motivation
Models are visual. They are potentially a more efficient and effective form of communication than prose. Models are more precise. Hard to recognize missing elements in written forms of requirements. With a model, missing elements are more noticeable. Models can represent ideas from different perspectives. When to model? During requirements, design, and post-implementation.

4 Use Case—Definition A use case is a narrative description of a goal-oriented interaction between the system under development and an external agent Includes (the what): User (Actor in Use Case Parlance) Goal Interaction Excludes (the how): User Interface Detail Implementation Concerns

5 Use Case Template Title: Actors: Preconditions: Postconditions:
Basic Flow / Main Success Scenario Alternate Flow / Extensions Open Issues

6 Example Title: Search Web with suggested key words (Google Suggest)
Actors: Web User Preconditions: Web user is at the search page Basic Flow User begins to enter search phrase As characters of search phrase are typed, the system responds with suggested search phrases that start with characters entered The system enters the highest ranking suggested search phrase into the search box where the user is typing User scrolls to desired suggested phrase User initiates search System responds with search results that match search phrase Alternate Flows 2a. There are no high ranking suggested search phrases for the characters the user has entered 1. The system gives no suggested search phrases 2. The user enters the remaining characters in the search phrase and control returns to step 5 in basic flow 4a. User decides to accept suggested search phrase in search box 1. User initiates search with suggested search phrase currently in search box 4b. User finishes entering original search phrase but doesn’t want to take system’s suggestion 1. User hits backspace to erase remaining suggested characters in search box Open Issues 1. How to decide the order or ranking of suggested search phrases.

7 System Under Development
UML Use Case Diagrams Newspaper Web Site Post article Journalist Reader Authenticate user Find and read article <<include>> System Under Development Use Case Actor Generic Form Example

8 UML Diagram Types Static Dynamic Class Diagrams State Machine Diagrams
Activity Diagrams Sequence Diagrams

9 UML Class Diagrams Generic Form Example Class Name Attributes
Relationship Class Name Attributes Operations Generic Form CourseOffering Student 10..30 * is enrolled in semester Course courseTitle 1 Example

10 UML State Machine Diagram
event [guard] action Initial State Final State Empty Ready for Business stock Ready to Dispense [credit > purchase price] [out of stock] enter money / update credit select beverage / reduce credit && dispense beverage && reduce stock Generic Form Example

11 Another State Machine Example
Waiting for Connection do/play soothing music Disconnected do/Attempt connection Connected Connection Established after (1 min) Introducing Application entry/audio intro after (2 min) / reassure user [! disconnected] / announce connection Waiting for Announceable building do/look for next valid building Lost Connection Established Newly Disconnected [disconnected] / announce disconnection Announcing Building entry/ announce building announceable building Building announcement order closest building that hasn’t already been announced. After all buildings within a certain range have been announced you can reannounce a building if it has been 12 minutes since it was last announced or it has gone out of range and back into range since it was last announced. This was used to explore an existing use case.

12 UML Activity Diagram Generic Form ... ... [cond] [cond] Activity
Transition Branch Merge Generic Form

13 UML Activity Diagram Example
[User doesn’t have authority to access web page] User Requests Web Page Show Web Page [else] [Web page requires authorization] Prompt for ID and password User enters ID and password [Invalid ID and/or password] [Valid ID and password] Issue “not authorized” Message [User has authority to access web page] [Session established] A junction point can be used to merge or split transitions. [Web page doesn’t require authorization] Predefined condition [else] evaluates to true if none of the other branch conditions evaluate to true. Branch conditions may be placed on a state as an alternative to adding a branch diamond. Example

14 The End


Download ppt "Capturing and Exploring Requirements with Use Cases and UML Models"

Similar presentations


Ads by Google