Use Case Modeling CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons, Inc. Copyright.

Slides:



Advertisements
Similar presentations
Use-Cases.
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.
CPSC 333: Foundations of Software EngineeringJ. Denzinger 2.2. Use Cases: Scenario based requirements modeling Recommended: Booch, Rumbaugh, Jacobson:
Use Case & Use Case Diagram
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
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.
Use cases.
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.
Information System Engineering
CS3773 Software Engineering Lecture 03 UML Use Cases.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
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 Modeling Written by: Zvika Gutterman Adam Carmi.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
Documenting Requirements using Use Case Diagrams
1 CS 425 Software Engineering Project Preparation Use Case Modeling [Based on Chapters 3 & 4, Arlow and Neustadt, “UML and the Unified Process,” Addison-Wesley,
Use Case Modelling.
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.
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
Systems Analysis and Design in a Changing World, 6th Edition
The first step in getting what you want is to decide what you want.
CMPT 275 Software Engineering
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.
UML REVIEW –PART1 1. Introduction What is UML visual modelling language UML is a language not a methodology? Q: why is this distinction important? UML.
Chapter 3 Use Cases.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
Systems Analysis and Design in a Changing World, 6th Edition
Object-Oriented Modeling
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.
Faculty of Computer & Information Software Engineering Third year
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 20. Review Software Requirements Requirements Engineering Process.
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
1 CMPT 275 Software Engineering Requirements Gathering Activity Janice Regan,
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.
Behavioral Modeling: Sequence and Communication Diagrams Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan.
Requirements Analysis and Design Engineering Southern Methodist University CSE 7313.
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 Use Case 1 what are use cases? “A specification of sequences of actions, including variant.
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.
1 Use Case Diagrams Use Case Actor Use case description Use case realization (Scenario) Use case relationships –Extends –Uses.
1 Structuring Systems Requirements Use Case Description and Diagrams.
Systems Analysis and Design in a Changing World, 6th Edition
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 Version /05/2004 © 2004 Robert Oshana Requirements Engineering Use cases.
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.
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.
Chapter 6: Structuring Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
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.
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.
Activity Diagrams Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan Mohan CIS 4800 Kannan Mohan Department.
Use Case Diagrams A Detailed Description. Use Case Diagrams Use case diagrams describe relationships between users and use cases A use case is a (usually.
Start at 17th March 2012 end at 31th March 2012
SE-565 Software System Requirements IV. Use Cases
Object Oriented Analysis and Design
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Object-Oriented Software Engineering
Presentation transcript:

Use Case Modeling CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan Mohan

Learning Objectives What is a use case diagram? What is its purpose? How do we create use case diagrams?

Use Case Diagram Example

Use Case Modeling - Overview A form of requirements engineering Lets us identify the system boundary, who or what uses the system, and what functions the system should offer Helps us identify and define all processes that our system must support

Use Case Modeling Find the system/automation boundary Find actors Find and specify use cases Describe scenarios Iterate until elements are stable

Elements in a Use Case Model System boundary/subject – the edge of the system – what part of the system is going to be automated? Actors – who or what uses the system? Use Cases – what do the actors do with the system? Relationships - between actors and use cases

Actors A role that someone or something (an external entity) in the environment plays in relation to our system Everything that interacts with the system Note that someone/something can play different roles simultaneously or over time Example – Customer and Administrator (John Doe might play both these roles)

Actors Could be a person, another software application, or hardware device – E.g.: Customer, Supply chain management system, printer Same actor can be involved in several use cases Actors are external to the system Do not confuse the role that someone plays with the person itself

Actors Who / which – Uses the main functionality of the system (primary actors)? – Needs system support for daily tasks? – Maintains, administers, operates system (secondary)? – Has interest in the results of the system? – Other systems interact with ours?

Actors Do things happen in your system at specific points in time that may not be triggered by any actor? Time as an actor Example? – Automatic system backup – Automatic triggering of s to customers on some occasions

Use Cases A specification of sequences of actions that a system performs Yields an observable result of value to a particular actor Provides a functional description of the system and its processes A “case of use” of the system by a specific actor

Use Cases Not a class or object, but a process that satisfies some user need Always initiated by an actor Provides value to an actor Written from the point of view of the actors Describe basic functions of the system – What the user can do – How the system responds

Finding Use Cases Start with the list of actors that interact with the system. – What function does the actor require from the system? – What does the actor need to do? – Does the actor need to read, create, destroy, modify, or store some kind of information in the system? – Does the system interact with any external system? – Does the system generate any reports?

Describing Use Cases Use cases connected to actors through associations Named according to what they performs – E.g.: Purchase insurance policy, Update account Usually starts with a verb

Scenario An instance of a use case – E.g.: “Customer purchases insurance” is instantiated as: – “John Doe contacts the system through the web and purchases insurance for his new car”

Use Case Specification Use case: Place Order ID: 1 Brief Description: This use case describes the process to follow when a customer places a new order. Primary actors: Customer Secondary actors: None Pre-conditions: The customer must have an account with us. Main flow: Actor actionSystem response 1. Customer searches for item. 2. System provides a list of items that matches the customers search keywords. 3. Customer selects an item. 4. System provides more information about the selected item. 5. Customer chooses to add item to cart.6. System adds item to cart. 7. Customer chooses to proceed to checkout.8. System asks for payment and shipping details. 9. Customer provides details and confirms order.10. System processes order. Post-conditions: Order must be processed and confirmation provided to customer. Alternate flows: Item not available Customer account ineligible for placing new orders

Branching: Alternative flows Alternative flows capture errors, branches, and interrupts Alternative flows usually do not return to the main flow Potentially very many alternative flows – Pick the most important ones – If there are groups of similar alternative flows - document one member of the group as an exemplar main flow alternative flows Use case

Referencing Alternative Flows List alternative flows at the end of the use case Examine each step in the main flow and look for: – Alternatives – Exceptions – Interrupts

An Alternative Flow Example May be triggered – instead of the main flow - started by an actor – after a particular step in the main flow – at any time during the main flow - at any time Alternative flow: Alternative flow: CreateNewCustomerAccount:Invalid Address Preconditions: 1. The Customer has entered an invalid address Primary actors: Customer Postconditions: None. The alternative flow begins after step 2.2. of the main flow. The system informs the Customer that he or she entered an invalid address ID: 5.1 Brief description: The system informs the Customer that they have entered an invalid address. Secondary actors: None.

Actor Generalization The Customer and the Sales Agent actors are very similar Similar (almost) interactions Simplifying the diagram Sales system ListProducts OrderProducts MakePayment CalculateCommission CustomerSalesAgent

Actor Generalization Inheritance Substitutability Parent actor – abstract? Sales system ListProducts OrderProducts MakePayment CalculateCommission PurchaserSalesAgentCustomer ancestor or parent descendents or children generalisation abstract actor

Use Case Generalization The ancestor use case must be a more general case of one or more descendant use cases Child use cases are more specific forms of their parent They can inherit, add and override features of their parent Sales system FindProduct FindBookFindCD Customer Use case generalization semantics Use case elementInheritAddOverride RelationshipYes No Extension pointYes No PreconditionYes PostconditionYes Step in main flowYes Alternative flowYes

Example with «includes»

When use cases share common behavior… The base use case executes until the point of inclusion: include (InclusionUseCase) – Control passes to the inclusion use case which executes – When the inclusion use case is finished, control passes back to the base use case which finishes execution Base use cases are not complete without the included use cases Inclusion use cases may be complete use cases, or they may just specify a fragment of behaviour for inclusion elsewhere «include»

Example with «include» Use case: CreateNewOrder Primary actors: Customer and Order Clerk Preconditions: Postconditions: 1. A new order is created. Main flow: include( ValidateCustomerAccount ). Include( LookupItemAvailability ). The system displays item and order details. … ID: 1 Brief description: Customer/Order clerk places new order. Alternative flows: None. Use case: ValidateCustomerAccount Primary actors: Customer and Order Clerk Preconditions: Postconditions: 1. Account has been verified. Main flow: The system asks for login information. The customer/order clerk enters authentication information. The system verifies account ID: 4 Brief description: The customer/order clerk logs in. Alternative flows: None. Seconday actors: None Seconday actors: None

«extend» Adding new behaviour into the base use case by inserting behavior from one or more extension use cases The base use case specifies one or more extension points in its flow of events The base use case does not know about the extensions

Base Use Case Extension points are not numbered, as they are not part of the flow Use case: ReturnBook Secondary actors: None. Preconditions: 1. The Librarian is logged on to the system. Postconditions: 1. The book has been returned. Main flow: The Librarian enters the borrower's ID number. The system displays the borrower's details including the list of borrowed books. The Librarian finds the book to be returned in the list of books. The Librarian returns the book. … ID: 9 Brief description: The Librarian returns a borrowed book. Alternative flows: None. ReturnBook extension points overdueBook IssueFine «extend» extension point: overdueBook extension point base use case extension use case extension point: overdueBook extension point name Primary actors: Librarian

Extension Use Case Extension use cases have one or more insertion segments which are behaviour fragments that will be inserted at the specified extension points in the base use case Extension Use case: IssueFine Primary actors: Librarian Segment 1 preconditions: 1. The returned book is overdue. Segment 1 postconditions: 1. The fine has been recorded in the system. 2. The system has printed out the fine. Segment 1 flow: The Librarian enters details of the fine into the system. The system prints out the fine ID: 10 Brief description: Segment 1: The Librarian records and prints out a fine. ReturnBook extension points overdueBook IssueFine «extend» extension point: overdueBook the single insertion segment in IssueFine is inserted at the overdueBook insertion point in the ReturnBook use case Secondary actors: None.

When to use advanced features? When it simplifies your use case model Use sparingly Remember the purpose – communication with stakeholders – Stakeholders may not understand – Inheritance Extension

Writing Use Cases Short and simple Focus on what, not how – Customer presses the OK button vs. – Customer accepts the order Avoid functional decomposition – Often used in traditional/structured approach

Avoid Functional Decomposition

When to Use ‘Use Case Analysis’ A good choice when the system: – is dominated by functional requirements – has many types of user to which it delivers different functionality – has many interfaces A poor choice when the system: – is dominated by non-functional requirements – has few users – has few interfaces

Requirements tracing Relating requirements and use cases Many-to-many relationship – One use case covers many individual functional requirements – One functional requirement may be realised by many use cases CASE support for requirements tracing: – UML tagged values - assign numbered requirements to use cases – Capture use case names in our Requirements Database Requirements Traceability matrix

Summary What are actors and use cases? What is the system boundary? How do you determine the above for a given system? What are use case diagrams comprised of? What are the various parts of use case specifications? What is requirements tracing?

Summary What is actor generalization? What is use case generalization? What are different types of relationships between use cases? – Explain > and > relationships. What are the general dos and don’ts in writing use cases?