Use Case Modeling Written by: Zvika Gutterman Adam Carmi.

Slides:



Advertisements
Similar presentations
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Use Cases CS/SWE 421 Introduction to Software.
Advertisements

Use Case Diagrams Damian Gordon.
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.
Systems Analysis and Design in a Changing World, Fourth Edition
Software Requirements
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
Finding Analysis Classes Written by Zvika Gutterman Adam Carmi.
Written by: Zvika Gutterman Adam Carmi
© 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.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
The chapter will address the following questions:
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 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. Overview The class model describes the objects in a system and their relationships, the state model describes the life cycles of.
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.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Use Cases CS/SWE 421 Introduction to Software.
© 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
Use Cases 1. Last week  Introduction to software engineering  How is it different from traditional engineering?  Introduction to specification  Operational.
Faculty of Computer & Information Software Engineering Third year
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 20. Review Software Requirements Requirements Engineering Process.
 A software application is like a city  Modeling = Architecture  OOP = Civil Engineering  UML Classes = Blueprints of Buildings  UML is a common.
Faculty of Computer & Information
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.
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.
Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore USE CASES BY.
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.
Example: object diagram for Scheduler, v What is wrong with this diagram? Seems like a lot of similarity between Task and UnplannedTask Can use.
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.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Use Cases CS/SWE 421 Introduction to Software.
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
Unified Modeling Language
Use Case Modeling.
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Object Oriented Analysis and Design
Using Use Case Diagrams
Presentation transcript:

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 –Actors –Use Case –Relationships Example: TVRS Use Cases.

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.

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.

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.

UCs vs. Requirements Doc. 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 trace-ability. –Easier user validation of functional requirements. –Helps structuring the users manuals. –A tool for finding classes.

Developing the UC model A Use Case model is described in UML 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.

Developing the UC model (cont.) 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.

Developing the UC model (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

Developing the UC model (cont.) Actors –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: Clerk – Enters data Supervisor – Allowed to modify/erase data Manager – Allowed to view statistics. –A single user may play more than one role.

Developing the UC model (cont.) –Actors have goals: 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. –The actor communicates with the system by sending and receiving messages. –An actor has a name that reflects its role. –A use case is always initiated by an actor.

Developing the UC model (cont.) –Actor icons: Clerk > Clerk

Developing the UC model (cont.) –Generalization 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. ClerkSupervisorManager

Developing the UC model (cont.) –Identifying actors Who will use the main functionality of the system? Who will need to maintain, administrate and keep the system working? Which hardware devices does the system handle? With which other systems does the system need to interact? –Other computer systems. –Other applications on the same computer (I.e. X client/server). –Pitfall: don’t confuse interaction with input.

Developing the UC model (cont.) Use Cases –Represent a complete functionality as perceived by an actor. A use case satisfies an actor’s goal. –Always initiated by an actor (directly or indirectly). –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). A use case is not complete until the end value is produced.

Developing the UC model (cont.) –Finding Use Cases For each of the actors previously defined: –Which services does the actor require from the system? »Read, create, destroy, modify, store information. –Does the actor have to be notified about events in the system, or does the actor need to notify the system about something? –Could the actor’s daily work be simplified or made more simple? »Don’t concentrate only on the current system.

Developing the UC model (cont.) –Defining a Use Case The description of a use case is normally done through a text description. A simple and consistent specification about how the actors and the system interact. Describe at the level of user intentions and system responses. –Free of technology and mechanism details, especially those related to user interface.

Developing the UC model (cont.) –Use Case description template: Name –Name of use case, usually close to the user’s goal. –Forward trace-ability –Unique Actors Goal description Reference to requirements –Backward trace-ability Pre-conditions –The necessary conditions that have to met before the use case can be performed. –Could be other Uses Cases as well (not equivalent to > at the beginning of the description).

Developing the UC model (cont.) Description –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. 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 or name of the extending Use Case.

Developing the UC model (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 specializing / extending use cases. Add Traffic Violation Traffic Violations Report system Clerk

Developing the UC model (cont.) –Use Case Relationships 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 > 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. > XY

Developing the UC model (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. SpecializedGeneralized

Developing the UC model (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). SpecializedGeneralized

Developing the UC model (cont.) Extend relationship –Similar to generalize relationship but with more rules to it. –The extended use case must explicitly declare the extension points. –Extend use cases that become too complicated. > (5: confirmation) New Offender Add T.R. (5: confirmation)

Developing the UC model (cont.) Recommended workflow: 1.Identify actors (and their relationships if necessary) 2.For each actor identified and until no new UC is discovered do 3.Find all the goals of the actor 4.Decide on the main course of success for each goal 5.Create a Use Case for each of the goals –New actors/goals may be discovered 6.Validate/correct existing Use Cases 7.Draw the Use Case diagram Simplify model by repeating the process incase the produced diagram is too complex

Example: TVRS Use Cases

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

Example – TVRS Use Cases 3.Supervisor confirms. 4.TVRS requests OffendersDB to delete the Traffic Violation from the offender’s record. 5.OffendersDB approves that the Traffic Violation has been deleted. 6.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.

Example – TVRS Use Cases –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.

Example – TVRS Use Cases –Name: Add Traffic Violation –Actors: Clerk, PolicemenDB, OffendersDB. –Goal: Add a new Traffic Violation to the TVRS. –References to requirements: … –Pre-conditions: The Traffic Violation Management window is displayed. –Description: 1.Clerk calls for addition of a new Traffic Violation. 2.TVRS displays an empty Traffic Violation Details form. 3.Clerk enters violation details and calls for saving the new Traffic Violation.

Example – TVRS Use Cases 4.TVRS prompts Clerk for confirmation. 5.Clerk confirms. 6.TVRS asks the PolicemenDB 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.[Extension point] OffendersDB replies that the offender is known. …

Example – TVRS Use Cases –Post-conditions: New Traffic Violation is stored in the TVRS. TVRS displays an empty Traffic Violation Details form. –Variations: 9a: OffendersDB replies that the offender is not known. –Described in Use Case “New Offender”. –Exceptions: 3a: Clerk cancels addition of the new Traffic Violation 3a1: TVRS displays the Traffic Violation Management window. 5a: Clerk cancels 5a1: TVRS continues to item 2 without clearing the traffic violation details entered by clerk.

Example – TVRS Use Cases 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 clerk. …

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”

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: Clerk enters offender details and calls for saving the new details. 9d: TVRS prompts Clerk for confirmation. 9e: Clerk 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 –...

Example – TVRS Use Cases Remove T.V Lookup T.V Replace Offender New Offender Edit T.V. (8) Add T.V. (9) Clerk Supervisor Traffic Violations Report System > OffendersDB PolicemenDB