Use Case Modeling - II Lecture # 27.

Slides:



Advertisements
Similar presentations
Withdrawal Transaction Use Case Primary Actor: Customer Pre-conditions: The customer must have a valid ATM card and PIN. Post-conditions: The customer.
Advertisements

Use cases Use-cases are a scenario based technique in the UML which identify the actors in an interaction and which describe the interaction itself A set.
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
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Use Case Modeling SJTU. Unified Modeling Language (UML) l Standardized notation for object-oriented development l Needs to be used with an analysis and.
USE CASE – ATM EXAMPLE Actors: ATM Customer ATM Operator Use Cases: The customer can withdraw funds from a checking or savings account query the balance.
SWE 214 (071) Use Case Diagrams Slide 1 Use Case Diagrams Examples.
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
CS3773 Software Engineering Lecture 03 UML Use Cases.
Software Modeling Jerry Lebowitz.
Tutorial 2. What is a UML Use Case Diagram? Use case diagrams model the functionality of a system using actors and use cases. Use cases are services or.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
Managing Changing Requirements: Structure the Use Case Model PowerPoint Presentation derived from IBM/Rational course Mastering Requirements Management.
1 IBM Software Group ® Mastering Requirements Management with Use Cases Module 10: Structure the Use-Case Model.
1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of.
Faculty of Computer & Information Software Engineering Third year
Use Cases 7/09. lnot part of the system lrepresents roles a user can play lrepresents a human, a machine or another system lactively exchanges information.
Faculty of Computer & Information
1 Use Case Modeling Reference: RUP Doc. Use Case Example 2.
Use Case Modeling Chapter 7 Part of Requirements Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
UML: The Unified Modeling Language Excertos do livro: The Unified Modelling Language User Guide by Grady Booch, James Rumbaugh and Ivar Jacobson.
Unified Modeling Language User Guide Section 4 - Basic Behavioral Modeling Chapter 16 - Use Cases Chapter 17 - Use Case Diagrams.
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
Unit 3 Functional Requirements. Syllabus Introduction Features and usecases Use case Scenarios Documenting use cases Levels of details SRS Document.
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.
Use Case Diagram Lecture # 1. Use Case Diagram Use-cases are descriptions of the functionality of a system from a user perspective.  Depict the behaviour.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
Chapter 3: Software Design –Use case Diagram Nouf Alghanmi.
1 After the scenarios are formulated Find all the use cases in the scenario Describe each of these use cases in more detail Participating actors Describe.
UC Diagram & Scenario RKPL C & D. Using Use Case Diagram Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior.
Requirements Document for the Banking System
1 Object-Oriented Static Modeling of the Banking System - III Lecture # 33.
1 Object-Oriented Static Modeling of the Banking System - II Lecture # 32.
1 Case Study and Use Cases for Case Study Lecture # 28.
Use Cases. 2 A use case... –Specifies the behavior of a system or some subset of a system. –Is a system-level function. –Does not indicative how the specified.
Embedded Systems Software Engineering
Systems Analysis and Design in a Changing World, Fourth Edition
Using Use Case Diagrams
Paul Ammann & Jeff Offutt
CMPE 280 Web UI Design and Development August 29 Class Meeting
Structured Analysis and Design Technique
ATM OO Design and Implementation Case Study
Writing Requirements.
Storyboarding and Game Design SBG, MBG620 Full Sail University
Dynamic Modeling of Banking System Case Study - I
Use Case Model.
Object-Oriented Static Modeling of the Banking System - I
Dynamic Modeling of Banking System Case Study - II
Exercices & Corrections Week 3
UML Use Case Diagrams.
Software Modeling Lecture # 11.
Start at 17th March 2012 end at 31th March 2012
SE-565 Software System Requirements IV. Use Cases
Concepts, Specifications, and Diagrams
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Paul Ammann & Jeff Offutt
Chapter 9 Use Cases.
Object Oriented Analysis and Design
Use Cases.
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Use Cases CS/SWE 421 Introduction to Software Engineering Dan Fleck
Use Case Model Use case diagram – Part 2.
Using Use Case Diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Interaction Modeling Extracted from textbook:
Real-Time Structured Analysis and Design Technique (RSTAD)
Presentation transcript:

Use Case Modeling - II Lecture # 27

Documenting Use Cases - 1 Name Summary Short description of use case Dependency (on other use cases) Actors Preconditions Conditions that are true at start of use case

Documenting Use Cases - 2 Flow of Events Narrative description of basic path Alternatives Narrative description of alternative paths Post-condition Condition that is true at end of use case

Use Cases and Flow of Events - 1 A use case describes what the system (or subsystem, class, or interface) does but it does not specify how it does it It is important that you keep clear the separation of concerns between this outside and inside view

Use Cases and Flow of Events - 2 The behavior of a use case can be specified by describing a flow of events in text clearly enough for an outsider to understand it easily

Use Cases and Flow of Events - 3 How and when the use case starts and ends When the use case interacts with the actors and what objects are changed The basic flow and alternative flows of behavior

Use Cases and Flow of Events - 4 A use case’s flow of events can be specified in a number of ways: Informal structured text (example to follow) Formal structured text (with pre- and post-conditions) Pseudocode

Organizing Use Cases - 1 Use cases can be organized by grouping them in packages You can also organize use cases by specifying generalization, include, and extend relationships among them

Organizing Use Cases - 2 You apply these relationships in order to factor common behavior (by pulling such behavior from other use cases that it includes) and in order to factor variants (by pushing such behavior into other use cases that extend it)

Organizing Use Cases - 3 Generalization among use cases is just like generalization among classes It means that the child use case inherits the behavior and meaning of the parent use case; the child may add to or override the behavior of its parent; and the child may be substituted any place the parent appears

Organizing Use Cases - 4 You may have a use case Validate User, which is responsible for the verifying the identity of the user This use case can be used in many different application domains

Specialized Use Cases You may have two specialized children of this use case (Check password and Retinal scan) Check password Validate user Retinal scan

Organizing Use Cases - 5 An include relationship between use cases means that the base use case explicitly incorporates the behavior of another use case at a location specified in the base The included use case never stands alone, but is only instantiated as part of some larger base that includes it It is like the base use case

Organizing Use Cases - 6 Include relationship is used to avoid describing the same flow of events several times, by putting the common behavior in a use case of its own This is an example of dependency Track order use case includes Validate user use case

Including a Use Case Obtain and verify the order number. include (Validate user). For each part in the order, query its status, then report back to the user Track order Validate user <<include>>

Organizing Use Cases - 8 An extend relationship between use cases means that the base use case implicitly incorporates the behavior of another use case at a location specified indirectly by extending use case The base use case may stand alone, but under certain conditions, its behavior may be extended by another use case

Organizing Use Cases - 9 A base use case may be extended only at certain points, called its extension points Extend relationship can be used to model Optional behavior Separate sub-flow that is executed only under given conditions Several flows that may be inserted at a certain point, governed by explicit interaction with an actor

Organizing Use Cases - 10 This is also an example of dependency Consider the Place order use case, which extends the Place rush order

<<extend>> Extending a Use Case <<extend>> (set priority) include (Validate user) Collect the user’s order items (set priority) Submit the order for processing Place rush order Place order Extension points set priority <<include>> Track order Validate user <<include>>

Organizing Use Cases - 11 In this example, set point is an extension point A use case may have more than one extension points

Organizing Use Cases - 12 Apply use cases to model the behavior of an element (system, subsystem, class) Outside view by domain experts Developers can approach the element Basis for testing

Guidelines for Use Cases - 1 Identify the actors that interact with the element. Candidate actors include groups that require certain behavior to perform their tasks or that are needed directly or indirectly to perform the element’s functions

Guidelines for Use Cases - 2 Organize actors by identifying general and more specialized roles For each actor, consider the primary ways in which that actor interacts with the element. Consider also interactions that change the state of the element or its environment or that involve a response to some event

Guidelines for Use Cases - 3 Consider the exceptional ways in which each actor interacts with the element Organize these behaviors as use cases, applying include and extend relationships to factor common behavior and distinguish exceptional behavior

Use Case Diagram for ATM Withdraw funds «include» Validate PIN ATM Customer «include» Query account «include» Transfer funds Add cash Startup Operator Shutdown

Abstract Use Case Example - 1 Name: Validate PIN Summary : System validates customer PIN Dependency: none Actors: ATM Customer Preconditions: ATM is idle, displaying a Welcome message.

Abstract Use Case Example - 2 Flow of Events: Basic Path 1. Customer inserts the ATM card into the Card Reader 2. If the system recognizes the card, it reads the card number 3. System prompt customer for PIN number 4. Customer enters PIN 5. System checks the expiration date and whether the card is lost or stolen

Abstract Use Case Example - 3 Flow of Events (cont.): 6. If card is valid, the system then checks whether the user-entered PIN matches the card PIN maintained by the system 7. If PIN numbers match, the system checks what accounts are accessible with the ATM card 8. System displays customer accounts and prompts customer for transaction type: Withdrawal, Query, or Transfer

Abstract Use Case Example - 4 Alternatives: If the system does not recognize the card, the card is ejected If the system determines that the card date has expired, the card is confiscated If the system determines that the card has been reported lost or stolen, the card is confiscated

Abstract Use Case Example - 5 Alternatives (cont.): If the customer-entered PIN does not match the PIN number for this card, the system re-prompts for PIN If the customer enter the incorrect PIN three times, the system confiscates the card If the customer enters Cancel, the system cancels the transaction and ejects the card Postcondition: Customer PIN has been validated

Concrete Use Case Example - 1 Name: Withdraw Funds Summary : Customer withdraws a specific amount of funds from a valid bank account Dependency: Include Validate PIN abstract use case Actors: ATM Customer Preconditions: ATM is idle, displaying a Welcome message.

Concrete Use Case Example - 2 Flow of Events: Basic Path 1. Include Validate PIN abstract use case 2. Customer selects Withdrawal, enters the amount, and selects the account number 3. System checks whether customer has enough funds in the account and whether the daily limit will not be exceeded

Summary Extended the discussion on Use Case Modeling The use cases are documented using simple flow of events along with any variations There are some relationships between use cases which help us in extending and reusing the existing use cases

References ‘The Unified Modeling Language User Guide’ by G. Booch, J. Rambaugh, & I. Jacobson, Addison-Wesley, 1998 ‘The Unified Modeling Language Reference Guide’ by J. Rambaugh, G. Booch, & I. Jacobson, Addison-Wesley, 1998 ‘Designing Concurrent, Distributed, and Real-Time Applications with UML’ by H. Gomaa, Addison-Wesley, 2000