The first step in getting what you want is to decide what you want.

Slides:



Advertisements
Similar presentations
Use-Cases.
Advertisements

Object-Oriented Analysis and Design Evolutionary Requirements.
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Actors and use cases Use-case diagram Brief notation Prioritization Fully dressed notation Requirements Functional requirements  Use-cases.
Writing Use Cases: Requirements in Context
Use cases.
Information System Engineering
Muhammad Usman, Assistant Professor
September Ron McFadyen1 design analysis implementation testing maintenance Waterfall Development Process Linear one phase is completed before.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
Jan Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box Actors.
COMP 350: Object Oriented Analysis and Design Lecture 3 Case Studies, Inception & Use Cases References: Craig Larman Chapters 3-6.
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” - may be of.
Fall 2009ACS-3913 Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
Use Cases & Requirements Analysis By: Mostafa Elbarbary.
Understanding Requirements
Copyright ©2004 Cezary Z Janikow 1 Use Cases n Within Requirements discipline/workflow n Verbal descriptions of important functional (behavioral, transactional,
1 Lecture 1: Processes, Requirements, and Use Cases.
Use Case Analysis 17-Apr-17 Software Engineering.
Object-Oriented Analysis and Design
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Use cases: deciding what you want.
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
Object-Oriented Analysis and Design
TK2023 Object-Oriented Software Engineering
Software Engineering 1 Object-oriented Analysis and Design Chap 30 Relating Use Cases.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
4 2009/10 Object Oriented Technology 1 Topic 4: The Object-Oriented Approach to Requirements Adopted from: Ch.7 The Object-Oriented Approach to Requirements.
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.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 20. Review Software Requirements Requirements Engineering Process.
Object-Oriented Analysis and Design Jan 14, 2009.
 Development is organized in a series of short, fixed-length mini-projects called iterations  Iterations are also incremental  Successive enlargement.
OOSE Use Case. Requirement Functional: –Features, capabilities, and security Non Functional: –Usability: Human factors, help, and documentation –Reliability:
2. Inception 6. Use-Case Model: Writing Requirements in Context.
Chapter 9 Applying UML and Patterns -Craig Larman
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
Goals and Scope of a Use Case
1 Structuring Systems Requirements Use Case Description and Diagrams.
Drawing System Sequence Diagrams
OO Methodology Inception Phase.
Use Cases Use Cases are employed to describe the functionality or behavior of a system. Each use case describes a different capability that the system.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
Business Analysis with For PG MDI, Gurgaon Kamna Malik, Ph.D.
1 Version /05/2004 © 2004 Robert Oshana Requirements Engineering Use cases.
R R R CSE870: Advanced Software Engineering: UML-- Use Cases1 Use Cases and Scenarios.
Requirements specification Why is this the first major stage of software development? –Need to understand what customer wants first Goal of requirements.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Scenario A scenario is a sequence of steps describing an interaction between a user and a system. Use case is a set of scenarios tied together by a common.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
PRESENTATION ON USE CASE. Use Case Modeling Use case diagrams describe what a system does from the standpoint of an external observer. The emphasis is.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
Chapter 6: Use Cases.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
Understanding Requirements
Larman chapter 61 Use cases Larman chapter 6. 2 Fig. 6.1.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
Jan Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
Systems Analysis and Design in a Changing World, 6th Edition
Use Case Model.
UML Use Case Diagrams.
Writing Use Cases.
Relating Use Cases popo.
Use Case Modeling.
Software Requirements
Object-Oriented Software Engineering
Use cases Dr. X.
Presentation transcript:

The first step in getting what you want is to decide what you want. Chapter 6 Use Cases The first step in getting what you want is to decide what you want. CS6359 Fall 2012 John Cole

What they are Use cases are text stories (not diagrams!) used to discover and record requirements If a diagram clarifies the text, use it CS6359 Fall 2012 John Cole

Definitions Actor – something with a behavior, such as a person, an input device, etc. Scenario – Specific sequence of actions and interactions between actors. (also called a use-case instance) Use Case is a collection of related success and failure scenarios that describe an actor using a system to support a goal CS6359 Fall 2012 John Cole

Dissecting a Use Case Process Sale: A customer arrives at a checkout with items to purchase. The cashier uses the POS system to record each purchased item. The system presents a running total and line-item details. The customer enters payment information, which the system validates and records. The system updates inventory. The customer receives a receipt from the system and leaves with the items. CS6359 Fall 2012 John Cole

Three Formats Brief – Terse, one-paragraph summary, usually the main success scenario. Create during early requirements phase. Casual – Informal paragraph format. Can cover various scenarios in multiple paragraphs. Fully-dressed – All steps and variations written in detail. Has supporting sections, success guarantees, main scenario, alternate scenarios, etc. CS6359 Fall 2012 John Cole

Use Case Exercise This is to be done in class. Give them some simple object, such as a phone, pen, or calculator, and, with class participation, construct a use case for it. Use NotePad to record the use case. CS6359 Fall 2012 John Cole

Scope Defines how broad the use case is. This can be for the whole system, as in the POS example, or narrow, as in a use case for creating a journal entry in an accounting system. CS6359 Fall 2012 John Cole

Level User-goal: Scenarios that let a user get something done. Corresponds to an elementary business process. Subfunction: smaller steps required to support a user goal. CS6359 Fall 2012 John Cole

Primary Actor The person (or sometimes object) that calls upon system services to fulfill a goal. (When might an actor not be a person?) CS6359 Fall 2012 John Cole

Stakeholders and Interests The stakeholders are people who have a reason to want this system. The Interests are their reasons for wanting it and what they expect from it. You could view the system as a contract between various stakeholders. CS6359 Fall 2012 John Cole

Preconditions and Success Guarantee These should be non-obvious. Preconditions state what must ALWAYS be true before you can start the scenario. This often defines the success of another use case. Success guarantees state what must be true on successful completion of the use case. CS6359 Fall 2012 John Cole

Main Success Scenario This satisfies the interests of the stakeholders. You get your groceries, the store gets your money, inventory is reduced, etc. Steps: An interaction between actors Validation (by the system) State change to the system CS6359 Fall 2012 John Cole

Extensions or Alternate Flows These are usually the majority of the text. Remember Murphy’s Law  These include all other possible outcomes, both success and failure. CS6359 Fall 2012 John Cole

Performing Another Use Case Use cases can branch to other use cases. For example, if a POS system rejects a bar code, the cashier can request alternate lookup. Denote this by underlining: Cashier performs Find Product Help to get item ID and price CS6359 Fall 2012 John Cole

Technology and Data Variations Technical variations on how something must be done: Scan bar code Key item ID RFID Avoid early design decisions; keep things general. CS6359 Fall 2012 John Cole

Write in a UI-Free Style Most programs are dependent upon a particular user interface. However, avoid constraining your program too early: “The user keys an ID and password into a dialog box and presses the OK button.” “The user identifies himself to the system.” The latter allows for biometric ID, keyin, etc. CS6359 Fall 2012 John Cole

Essential Style Focus on the essence, or basic idea, not the details of implementation Contrast with concrete style CS6359 Fall 2012 John Cole

Write Terse Use Cases Enough said CS6359 Fall 2012 John Cole

Write Black-Box Use Cases Don’t describe internal workings Describe responsibilities “The system records the sale” vs. “The System writes the sale record to a database” CS6359 Fall 2012 John Cole

Actor-Goal Perspective “A set of use-case instances, where each instance is a sequence of actions a system performs that yields an observable result of value to a particular actor.” Focus on the users, asking about their goals Understand what the actors consider a valuable result CS6359 Fall 2012 John Cole

Finding Use Cases Choose the system boundary Identify the primary actors Identify the goals for each primary actor Define use cases that satisfy these goals CS6359 Fall 2012 John Cole

Questions to Find Actors and Goals Who starts and stops the system? Who does user and security management? Who does system administration? Is “time” an actor because the system does something in response to a time event? How are software updates handled? Who gets notified of problems? CS6359 Fall 2012 John Cole

Actor-Goal List Actor Goal Cashier Process Sales Process rentals Handle returns Cash in Cash out Manager Start up Shut down System administrator Add/Modify/Delete users Manage security Manage System tables … CS6359 Fall 2012 John Cole

Who is the Primary Actor? Cashier? Why? Customer? Why Depends upon the system boundary CS6359 Fall 2012 John Cole

Event Analysis Look at external events. E. g. “Enter sale line items” or “enter payment.” CS6359 Fall 2012 John Cole

Which is a Valid Use Case? Negotiate a supplier contract Handle returns Log in Move pieces on a game board CS6359 Fall 2012 John Cole

Tests The Boss test: “What have you been doing all day?” Is this strongly related to achieving results? The Elementary Business Process test: Task performed by one person at one place at one time in response to a business event that adds value and leaves data in a consistent state. The size test: Fully dressed is 3-10 pages. Reasonable violations: Separate subfunction, or fails boss test but is complex and useful. CS6359 Fall 2012 John Cole

Applying UML: Diagrams “Use case diagrams and use case relationships are secondary in use case work. Use cases are text documents. Doing use case work means to write text.” P. 89. Do not use diagrams as a substitute for thinking. CS6359 Fall 2012 John Cole

A simple diagram can add clarity CS6359 Fall 2012 John Cole

Activity Diagrams CS6359 Fall 2012 John Cole

Requirements in Context Use cases organize a set of requirements in the context of a typical use of the system Replace low-level feature lists High-level feature lists are acceptable Some applications need feature-driven viewpoint; don’t create use cases for these CS6359 Fall 2012 John Cole

Use Cases in Iterative Methods Functional requirements are in use cases Use-case realizations drive design Use cases influence organization of user manuals Testing corresponds to use case scenarios UI shortcuts may be created for most common scenarios CS6359 Fall 2012 John Cole

When should UP artifacts be created? Table on P. 96 CS6359 Fall 2012 John Cole

Chapter 30 -- Relating Use Cases Use cases can be related to each other. For example, Handle Credit Payment can be part of Process Sale and Process Rental CS6359 Fall 2012 John Cole

The include Relationship Don’t duplicate text. Separate it into is own subfunction use case and indicate its inclusion Paying by credit: include Handle Credit Payment CS6359 Fall 2012 John Cole

Handle Credit Payment Level Subfunction Main success scenario Customer enters his credit account information System send payment authorization request to external system System receives payment approval and signals cashier Extensions 2a. System cannot communicate with external system … CS6359 Fall 2012 John Cole

Terminology A concrete use case is initiated by an actor and performs the entire behavior An abstract use case is never instantiated by itself. It is a subfunction. A base use case includes another use case or is extended or specialized by one An addition use case is the use case that is the extension, inclusion, or specialization CS6359 Fall 2012 John Cole

The extend Relationship If a use case cannot be modified, it can be extended. Example: base case is Process Sale. This must be extended to handle gift certificates CS6359 Fall 2012 John Cole

Handle Gift Certificate payment Trigger: Customer wants to pay with gift certificate Extension points: payment in Process Sale Main success scenario: Customer gives gift certificate to cashier. Cashier enters certificate ID … CS6359 Fall 2012 John Cole