Written by: Zvika Gutterman Adam Carmi

Slides:



Advertisements
Similar presentations
Use Case Diagrams Damian Gordon.
Advertisements

CPSC 333: Foundations of Software EngineeringJ. Denzinger 2.2. Use Cases: Scenario based requirements modeling Recommended: Booch, Rumbaugh, Jacobson:
Use Case & Use Case Diagram
Karolina Muszyńska Based on:
Use Case Modeling SJTU. Unified Modeling Language (UML) l Standardized notation for object-oriented development l Needs to be used with an analysis and.
Agenda What is a Use Case? Benefits of the Use Cases Use Cases vs. Requirements document Developing the Use Case model System Actor Use Case Use Case.
CS3773 Software Engineering Lecture 03 UML Use Cases.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Conversation Form l One path through a use case that emphasizes interactions between an actor and the system l Can show optional and repeated actions l.
Use-case Modeling.
Software Requirements
Use Case modelling 3 How to go from a diagram to a further definition.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Use Case modelling How to go from a diagram to a further definition.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
Finding Analysis Classes Written by Zvika Gutterman Adam Carmi.
Documenting Requirements using Use Case Diagrams
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Use Case Modelling.
Finding Analysis Classes Written by Zvika Gutterman Adam Carmi.
© Copyright Eliyahu Brutman Programming Techniques Course.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
Use Case Diagram (UCD) Yong Choi BPA.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
USE Case Model.
Use Cases Why use ‘em? How do they work? UC diagrams Using them later in the software development cycle.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
1 © 2005 course technology University Of Palestine Chapter 6 Storyboarding the User’s Experience.
Interaction Modeling. Introduction (1) Third leg of the modeling tripod. It describes interaction within a system. The class model describes the objects.
Understanding User Requirements. Documenting Use Cases 2 At this stage of the exploration, the participants should be thinking of essential use cases.
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.
© 2005 course technology1 1 1 University Of Palestine UML for The IT Business Analyst A practical guide to Object Oriented Requirement Gathering Hoard.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 4: Restaurant.
Requirements Analysis and Design Engineering Southern Methodist University CSE 7313.
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 1: Introduction to Use-Case Modeling.
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.
Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Engineering Lab Use Cases Faculty of Information system Technology.
Object Oriented Analysis & Design & UML (Unified Modeling Language) 1 Part II: Requirements The requirements workflow Use case modeling Advanced.
Use Cases, Part I Understanding the Business Dynamics  Understand the business workflow  Identify system support points the system 'use cases'
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.
Use Case Diagram The purpose is to communicate the system’s functionality and behaviour to the customer or end user. Mainly used for capturing user requirements.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
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.
1 Unified Modeling Language, Version 2.0 Chapter 2.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
Software Requirements
UML - Development Process 1 Software Development Process Using UML.
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
Use Case Diagrams. Introduction In the previous Lecture, you saw a brief review of the nine UML diagrams. Now that you have the clear, you'll start to.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Use Case, Component and Deployment Diagrams University of Sunderland.
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.
Welcome to M301 P2 Software Systems & their Development
Using Use Case Diagrams
Unified Modeling Language
UML Use Case Diagrams.
Use Case Modeling.
IMPORTANT NOTICE TO STUDENTS:
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Object Oriented Analysis and Design
Use Case Model Use case diagram – Part 2.
Using Use Case Diagrams
Presentation transcript:

Written by: Zvika Gutterman Adam Carmi Use Case Modeling Written by: Zvika Gutterman Adam Carmi

Agenda What is a Use Case? Benefits of the Use Cases Use Cases vs. Requirements document Developing the Use Case model System Actor Use Case Use Case Relationships Example: TVRS Use Cases Use Case Modeling

What is a Use Case? Created by Ivar Jacobson (1994) “A use case is a sequence of transactions in a system whose task is to yield a measurable value to an individual actor of the system” Describes WHAT the system (as a “Black Box”) does from a user’s perspective A set of scenarios tied together by a common user goal The Use Case Model is NOT an inherently object oriented modeling technique Use Case Modeling

Benefits of Use Cases Captures functional requirements from user’s perspective Gives a clear and consistent description of what the system should do A basis for performing system tests Provides the ability to trace functional requirements into actual classes and operations in the system Use Case Modeling

Benefits of Use Cases (cont.) Serves as a unit of estimation The smallest unit of delivery Each increment that is planned and delivered is described in terms of the Use Cases that will be delivered in that increment Use Case Modeling

Use Cases vs. Requirements A requirements document states what the system shall do. Use Cases describe actions that the users take and the responses that the system generates Use Cases are sometimes used as a means to elicit requirements Requirements may be effectively documented as Use Cases Better traceability Easier user validation of functional requirements Helps structuring the user’s manual A tool for finding classes Use Case Modeling

UML's Use Case Diagrams A Use Case model is described in UML (Unified Modeling Language) as one or more Use Case Diagrams (UCDs) A UCD has 4 major elements: The system described The actors that the system interacts with The use-cases, or services, that the system knows how to perform The relationships between the above elements Use Case Modeling

System As part of use-case modeling, the boundaries of the system developed must be defined A system does not necessarily have to be a software system Defining the boundaries of the system is not trivial Which tasks are automated and which are manual? Which tasks are performed by other systems? The entire solution that we supply should be included in the system boundaries Incremental releases Use Case Modeling

System (cont.) A system in a UCD is represented as a box The name of the system appears above or inside the box Traffic Violations Report System Use Case Modeling

Actor Someone or something that interacts with the system (exchanges information with the system) An actor represents a role played with respect to the system, not an individual user of the system Example: Policeman – Enters data Supervisor – Allowed to modify/erase data Manager – Allowed to view statistics. A single user may play more than one role Use Case Modeling

Actor (cont.) Actors have goals: Actors don’t need to be human Add a Traffic Violation Lookup a Traffic Violation Actors don’t need to be human May be an external system that interfaces with the developed system An actor has a name that reflects its role In this course a use case is always initiated by an actor Use Case Modeling

Actor Icons Policeman << Actor >> Use Case Modeling

Relationships between Actors When several actors as part of their roles, also play a more generalized role, it is described as generalization The behavior of the general role is described in an actor super-class The specialized actors inherit the behavior of the super-class and extend it in some way Relationships between actors are not always necessary Manager Supervisor Policeman Use Case Modeling

Use Case Represent a complete functionality as perceived by an actor A use case satisfies an actor’s goal Always initiated by an actor A use case provides a value to an actor A use case is complete Don’t divide a use case into smaller use cases that implement each other (functional decomposition) Use Case Modeling

Use Case (cont.) The scenarios of a use case are normally described textually A simple and consistent specification about how the actors and the system interact Use case description template Describe at the level of user intentions and system responses Free of technology and mechanism details, especially those related to user interface Use Case Modeling

UC Description Template Name Name of use case, usually close to the user’s goal Forward traceability (unique) Actors Goal description Reference to requirements Backward trace-ability Pre-conditions The necessary conditions that have to be met before the use case can be performed Could be other Use Cases as well (not equivalent to <<include>> at the beginning of the description) Use Case Modeling

UC Description Template (cont.) A description of the basic or normal course that should be taken by the system if the system should perform as intended Post-conditions The state of the system after the use case is performed The value delivered to the actor Distinguishes between variations and exceptions Variations Expected condition causing the branch Description of the alternative course or name of the extending Use Case Exceptions Unexpected condition causing the branch (conflicts with post-condition) Description of the alternative course Use Case Modeling

Use Case (cont.) Use Case Icon An ellipsis containing the name of the Use Case Placed inside the boundaries of the modeled system Connected to at least one actor with a communication association Except for specialized / extending use cases. Add Traffic Violation Traffic Violations Report system Policeman Use Case Modeling

Use Case Relationships Generalization: A generalized Use Case describes the common of other specialized Use Cases. Inclusion: A Use Case is a part of another Use Case. Extension: A Use Case may extend another Use Case. Use Case Modeling

Use Case Relationships (cont.) Generalization relationship Used when a number of Use Cases all have some subtasks in common, but each one has something different about it that makes it impossible to lump them all in a single use case The generalized and specialized use cases must share the same goal A specialized Use Case may capture an alternative scenario of the generalized Use Case The generalized Use Case must be complete Specialized Generalized Use Case Modeling

Use Case Relationships (cont.) Generalization relationship (cont.) The Specialized use case may interact with new actors. The Specialized use case may add pre-conditions and post-conditions (AND semantics). Specialized Generalized Use Case Modeling

Use Case Relationships (cont.) Include relationship (“uses” in older versions) When a number of Use Cases have common behavior, this behavior can be modeled in a single use case that is used by the other use cases X << includes >> Y indicates that the process of doing X always involves doing Y at least once Beware of functional decompositions The included Use Case must be complete X must satisfy the pre-conditions of Y before including it Not necessarily preserves the pre or post conditions. << include >> X Y Use Case Modeling

Use Case Relationships (cont.) Extend relationship Serves as extension point to another Use Case. The extended Use Case must explicitly declare its extension points. The extension conditions of the extended Use Case are part of the pre-conditions (AND semantics). << extend >> (9: OffendersDB replies) New Offender Add T.R. Use Case Modeling

Recommended Workflow Identify actors (and their relationships if necessary) For each actor identified and until no new UC is discovered do Find all the goals of the actor Decide on the main course of success for each goal Create a Use Case for each of the goals New actors/goals may be discovered Validate/correct existing Use Cases Draw the Use Case diagram Simplify model by repeating the process incase the produced diagram is too complex Use Case Modeling

Example: TVRS Use Cases

Example – TVRS Use Cases Remove T.V Lookup T.V Replace Offender New Offender Edit T.V. (8) Add T.V. (9) Policeman Supervisor Traffic Violations Report System <<extend>> <<include>> OffendersDB PolicemenDB Use Case Modeling

Example – TVRS Use Cases External System Name: Remove Traffic Violation Actors: Supervisor, OffendersDB. Goal: Remove an existing Traffic Violation References to requirements: 1.2.3, 1.3.2.4, … Pre-conditions: Normal Course of “Lookup Traffic Violation” UC is completed, and the details of an existing Traffic Violation are displayed Description: Supervisor calls for deletion of the chosen Traffic Violation TVRS prompts Supervisor for confirmation Use Case Modeling

Example – TVRS Use Cases Supervisor confirms TVRS requests OffendersDB to delete the Traffic Violation from the offender’s record OffendersDB approves that the Traffic Violation has been deleted TVRS allows Supervisor to look up a new Traffic Violation as described in the “Lookup Traffic Violation” UC Post-conditions: Removed Traffic Violation is no longer stored in the TVRS. Traffic Violation is removed from the offender’s record in the OffendersDB "Lookup Traffic Violation" form is displayed Use Case Modeling

Example – TVRS Use Cases Goal is not fulfilled Exceptions: 3a: Supervisor cancels: 3a1: TVRS Continues to item 6 without removing the Traffic Violation 5a: Traffic Violation is not removed from the OffendersDB 5a1: TVRS displays an error message describing the failure 5a2: TVRS continues to item 6 without clearing chosen Traffic Violation details, and without deleting the Traffic Violation Use Case Modeling

Example – TVRS Use Cases (With planted mistakes) Name: Add Traffic Violation Actors: Policeman, PolicemenDB, OffendersDB, Traffic Violation. Goal: Add a new Traffic Violation to OffendersDB. References to requirements: … Pre-conditions: Pliceman tries to add Traffic Violation. Description: Policeman calls for addition of a new Traffic Violation TVRS displays an empty Traffic Violation Details form Policeman enters violation details and calls for saving the new Traffic Violation TVRS The Traffic Violation Management window is displayed 1. Policeman presses “Add” button Use Case Modeling

Example – TVRS Use Cases (With planted mistakes) TVRS prompts Policeman for confirmation. Policeman confirms 6. PolocemenDB is asked whether or not the policeman is known 7. PolicemenDB replies that the policeman is known 8. TVRS asks the OffendersDB whether or not the offender is known 9. OffendersDB replies that the offender is known … TVRS asks PolicemenDB [Extenstion Point] Always! Always? Use Case Modeling

Example – TVRS Use Cases (With planted mistakes) Post-conditions: New Traffic Violation is stored in the TVRS TVRS displays an empty Traffic Violation Details form Variations: 5a: Policeman cancels 5a1: TVRS shows error message and closes Traffic Violation Management window. 5a1: TVRS continues to item 2 without clearing the traffic violation details entered by Policeman 9a: OffendersDB replies that the offender is not known. Described in Use Case “New Offender” 7a: Policeman is not stored in the PolicemenDB 7a1: TVRS displays an error message 7a2: TVRS continues to item 2 without clearing Traffic Violation details entered by Policeman ... Goal may be fulfilled Use Case Modeling

Example – TVRS Use Cases (With planted mistakes) Exceptions: 3a: Policeman cancels addition of the new Traffic Violation 3a1: TVRS continues to item 2 without clearing the traffic violation details entered by Policeman 3a1: TVRS displays the "Traffic Violation Management" window without adding the Traffic Violation … Use Case terminated Use Case Modeling

Example – TVRS Use Cases Name: New Offender [extends “Add Traffic Violaton” ] Actors: Goal: References to requirements: … Pre-conditions: Offender is not stored in the OffendersDB UC attributes are “inherited” Use Case Modeling

Example – TVRS Use Cases Description: 9a: OffendersDB replies that the offender is not known. [Add Traffic Violation] 9b: TVRS displays an empty “Offender Details form” 9c: Policeman enters offender details and calls for saving the new details 9d: TVRS prompts Policeman for confirmation 9e: Policeman confirms 9f: TVRS requests OffendersDB to store the new offender 9g: OffendersDB replies that offender was stored successfully Post-conditions: New Offender is stored in the offenders DB ... Use Case Modeling

Rational Rose™ Use Case Modeling