A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.

Slides:



Advertisements
Similar presentations
Writing Good Use Cases - Instructor Notes
Advertisements

CPSC 333: Foundations of Software EngineeringJ. Denzinger 2.2. Use Cases: Scenario based requirements modeling Recommended: Booch, Rumbaugh, Jacobson:
Actors and use cases Use-case diagram Brief notation Prioritization Fully dressed notation Requirements Functional requirements  Use-cases.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Use-case Modeling.
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 14 Requirements and Specifications. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Software Engineering The implementation.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
WEEK 4 Material Lecture 4a (Wed.). Use Cases/Actors o What is a use case ? l A sequence of actions performed by a system that yields an observable result.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Use cases and requirement specification - 1 Use case diagrams 3 use cases System boundaries Remember: Use case diagramming is a tool, not the requirements.
Functional Requirements – Use Cases Sriram Mohan/Steve Chenoweth (Chapters 14, 21 – Requirements Text) 1.
Use Cases: The Technique
Chapter 6 Functional Modeling
Sharif University of Technology1 Design and Use-case Realization Software Engineering Laboratory Fall 2006.
Functional Modeling Chapter 6.
SE 555 Software Requirements & Specification Requirements Analysis.
Recall The Team Skills Analyzing the Problem
USE Case Model.
Chapter 7 Requirement Modeling : Flow, Behaviour, Patterns And WebApps.
Use Cases Why use ‘em? How do they work? UC diagrams Using them later in the software development cycle.
Use Case Diagrams – Functional Models Chapter 5. Objectives Understand the rules and style guidelines for activity diagrams. Understand the rules and.
RUP Requirements RUP Artifacts and Deliverables
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
Object-Oriented Analysis - Instructor Notes
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
Understanding User Requirements. Documenting Use Cases 2 At this stage of the exploration, the participants should be thinking of essential use cases.
From Use Cases to Test Cases 1. A Tester’s Perspective  Without use cases testers will approach the system to be tested as a “black box”. “What, exactly,
Requirement Engineering. Review of Last Lecture Problems with requirement Requirement Engineering –Inception (Set of Questions) –Elicitation (Collaborative.
10/12/ Recall The Team Skills 1. Analyzing the Problem (with 5 steps) 2. Understanding User and Stakeholder Needs 1. Interviews & questionnaires.
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Use Cases 1. Last week  Introduction to software engineering  How is it different from traditional engineering?  Introduction to specification  Operational.
Requirements Artifacts Precursor to A & D. Objectives: Requirements Overview  Understand the basic Requirements concepts and how they affect Analysis.
 A software application is like a city  Modeling = Architecture  OOP = Civil Engineering  UML Classes = Blueprints of Buildings  UML is a common.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Requirements Capture. Four Steps of requirements capture List candidate requirements Understand system context Capture functional requirements Capture.
UML-1 3. Capturing Requirements and Use Case Model.
UML-1 8. Capturing Requirements and Use Case Model.
1 Use Case Modeling Reference: RUP Doc. Use Case Example 2.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 1: Introduction to Use-Case Modeling.
Yarmouk University Department of Computer Information Systems CIS 499 Yarmouk University Department of Computer Information Systems CIS 499 Yarmouk University.
Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Engineering Lab Use Cases Faculty of Information system Technology.
Systems Analysis and Design in a Changing World, 6th Edition
Functional Requirements – Use Cases (Chapters 14, 21) Sriram Mohan 1.
Use Case Model Use case diagram.
1 Modeling System Requirements with Use Cases. 2 Why Do We Need Use Cases? Primary challenge in a system design process –ability to elicit correct and.
1 Version /05/2004 © 2004 Robert Oshana Requirements Engineering Use cases.
Use Case Model Use case diagram. Relevant Requirements Artifacts Use-Case Model Supplementary Specification Use-Case Specifications... Glossary Actors.
Systems Analysis and Design in a Changing World, Fourth Edition
UML - Development Process 1 Software Development Process Using UML.
Use Case Model Use case description.
Refining the Use Cases 1. How Use Cases Evolve  Early efforts typically define most of the major use cases.  The refining stages complete the process.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
High Level Design Use Case Textual Analysis SE-2030 Dr. Mark L. Hornick 1.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
George Wang, Ph.D. COMP 380/L Lesson 2. Use Case Use cases are a way to capture system functionalities (i.e., functional requirements) Based on use case.
1 Team Skill 3 Defining the System Part 1: Use Case Modeling Noureddine Abbadeni Al-Ain University of Science and Technology College of Engineering and.
Systems Analysis and Design in a Changing World, Fourth Edition
Systems Analysis and Design in a Changing World, 6th Edition
Lec-5 : Use Case Diagrams
Recall The Team Skills Analyzing the Problem (with 5 steps)
Unified Modeling Language
Use Case Model Use case diagram.
Recall The Team Skills Analyzing the Problem
Use Case Model Use case description.
Systems Analysis and Design in a Changing World, 6th Edition
Use Case Model Use case diagram – Part 2.
Software Development Process Using UML Recap
Presentation transcript:

A Use Case Primer 1

The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers to think through the design of a system from the perspective of a user.  Use cases engage the users in the requirements process, helping them to understand the proposed system and giving them a way to communicate their needs.  Use cases give context for the requirements of the system.  Use cases provide an ordering mechanism for requirements; they show the ordering of things. 2

The Benefits of Use Cases (Cont’d)  In most cases, developers write use cases. That shows they understand the requirements and accept responsibility for them.  Use cases are a critical tool in the analysis process, helping to understand what the system needs to do.  Use cases are a critical tool in the design and implementation process, reducing the risk of inconsistencies when moving from requirement to design to implementation.  Use cases carry over directly into the testing process.  Use cases serve as inputs to the user documentation. 3

What is a Use Case? A use case describes sequences of actions a system performs that yield an observable result of value to a particular actor. (In UML, a use case is represented by an oval.) 4

Use Case Basics  Sequences of actions: The sequences of actions describe a set of functions performed, an algorithmic procedure, or any other internal process that produces a result. The set is invoked when the actor initiates the use case by providing some input to the system. An action is atomic; that is, it is performed entirely or not at all. 5

Use Case Basics (Cont’d)  System performs: The system works for the actor. It exhibits the functionality described in the use case and takes its orders from the actor as to when to do what.  An observable result of value: The use case must be “of value” to a user. The system must do something for the user. 6

Use Case Basics (Cont’d)  A particular actor: The particular actor is the individual or device that initiates the action. 7

What is an Actor? An actor is someone or something that interacts with the system. (In UML an actor is represented as a simple stick figure.) 8

Types of Actors  Users: Users act on the system and this is the most common type of actors.  Other Systems or Applications: Most software systems interact with other systems or applications. These are also actors.  A Device: Input and output devices can also be actors. 9

Mandatory Elements of a Use Case 1. Name: Each use case has a name which describes what is accomplished by interaction with the actor. It must be unique for each use case. 2. Brief Description: The purpose of the use case should be described in one or two sentences. 3. Actors: Since a use case has no meaning outside its use by an actor, each actor that participates in the use case must be listed. 10

Mandatory Elements of a Use Case (Cont’d) 4. Flow of Events: The heart of the use case is the event flow, usually expressed as a textual description of the interactions between the system and the actor. The flow of events can consist of both the basic flow, or main path through the use case and alternate flows which are executed only under certain circumstances. 11

Optional Use Case Elements  Pre-conditions: Those conditions that must be true before a use case can start.  Post-conditions: Conditions that describe the state of the system after a use case has completed.  System or Subsystem: In a system comprised of many subsystems, it must be specified whether a use case is a system- level use case or which subsystem it is identified with. 12

Optional Use Case Elements (Cont’d)  Other Stakeholders: It may be useful to identify other stakeholders who are affected by the use case.  Special Requirements: There may be special requirements (e.g., performance or throughput) that may be related to a use case that should be specified. 13

Optional Use Case Elements (Cont’d)  Other Stakeholders: It may be useful to identify other stakeholders who are affected by the use case.  Special Requirements: There may be special requirements (e.g., performance or throughput) that may be related to a use case that should be specified. 14

Building the Use Case Model  It is a top down process that depends on first building a context model of the system.  That model is successively refined until the detailed behaviors are understood.  It is an iterative process in which the various steps are revisited over time. 15

Steps in Building the Use- Case Model 1. Identify and Describe the Actors: Identify all actors that interact with the system. Who uses the system? Who gets information from the system? Who provides information to the system? Where in the organization is the system used? Who supports and maintains the system? What other systems use the system? 16

Steps in Building the Use- Case Model (Cont’d) 2. Identify the Use Cases and Write a Brief Description: Identify what actors need to do to accomplish their tasks. What will the actor use the system for? Will the actor create, store, change, remove, or read data in the system? Will the actor need to inform the system about external events or changes? Will the actor need to be informed about certain occurrences in the system? 17

Steps in Building the Use- Case Model (Cont’d)  Choose Use-Case names carefully – a few words beginning with a verb is usually a good idea, e.g., “Change Password”.  Consider the following template: Use-Case Name Actor(s): Description: 18

Steps in Building the Use- Case Model (Cont’d) 3. Identify the Actor and Use-Case Relationship: Although only one actor can initiate a use-case, many use-cases involve the participation of multiple actors. Each use-case must be analyzed to see what actors interact with it. 19

Steps in Building the Use- Case Model (Cont’d) 4. Outline the Individual Use Cases: Before developing detailed use-cases for the system, outlines of each should be developed. Of particular interest at this point is the flow of events, including the basic and alternate flows. 20

Steps in Building the Use- Case Model (Cont’d)  Basic flow:  What event starts the use case?  How does the use case end?  How does the use case repeat some behavior?  Alternate flow:  Are there optional situations in the use case?  What odd cases might happen?  What variants might happen?  What may go wrong?  What may not happen?  What kind of resources can be blocked? 21

Steps in Building the Use- Case Model (Cont’d) 5. Refine the Use Cases: At some point later in the project lifecycle, the time will be right to refine the use cases developed. At that time there are a number of additional factors to be considered. 22

Steps in Building the Use- Case Model (Cont’d)  All alternate flows, including exception conditions: Identifying primary alternate flows is straightforward, but flows due to exception conditions may not be clear initially.  Pre- and Post-conditions: The refinement process will start to identify state information that controls the behavior of the system 23

Use Cases and User Interfaces  The world of use-case specification and user interface design tend to lead parallel lives.  The development team must decide what choices the user makes given the screens, dialog boxes, and so on that we have presented to the user, what the system does based on those selections, and what screens, choices, and so on the system presents to the user. 24

The Use Cases and User Interfaces Conundrum  How can a use case be specified if the user interface hasn’t been designed yet?  How can the user interface be designed to implement use case that have yet to be specified? 25

Use Cases and Storyboarding  A Storyboard Defines:  Who the players are  What happens to them  How it happens  If the player is a specific user and the interaction is between that user and the user interface, then storyboarding can help us describe how we are approaching the interaction.  We can use iterative and incremental techniques to converge on the user interface and the use case at the same time. 26

Use Case Storyboard Example Use Case Sequence: Inserting Online Clip Art (This series of steps within a larger use case allows the user to access an online clip art repository and select and insert a new clip art item.) 1. The user puts the cursor at the desired clip art location and selects the function for inserting clip art. 2. The system displays the clip art source locations. 3. The user selects the “Clip Online” choice. 4. The system launches the browser and automatically navigates to the online library. 5. The user navigates to the selected art item