Use cases.

Slides:



Advertisements
Similar presentations
Use-Cases.
Advertisements

Object-Oriented Analysis and Design Evolutionary Requirements.
IT Requirements Capture Process. Motivation for this seminar Discovering system requirements is hard. Formally testing use case conformance is hard. We.
© 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
Information System Engineering
Objectives Detailed Object-Oriented Requirements Definitions
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.
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.
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.
Systems Analysis and Design in a Changing World, Fourth Edition
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
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Copyright ©2004 Cezary Z Janikow 1 Use Cases n Within Requirements discipline/workflow n Verbal descriptions of important functional (behavioral, transactional,
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
The first step in getting what you want is to decide what you want.
Chapter 7: The Object-Oriented Approach to Requirements
System Sequence Diagrams
Use-Case Model: Writing Requirements in Context
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
Software Engineering 1 Object-oriented Analysis and Design Chap 30 Relating Use Cases.
Object-Oriented Analysis - Instructor Notes
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
ZEIT2301 Design of Information Systems Functional Design: Use Cases School of Engineering and Information Technology Dr Kathryn Merrick.
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.
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:
Originated by K.Ingram, J.Westlake.Edited by N.A.Shulver Use Case Scripts What is a Use Case Script? The text to describe a particular Use Case interaction.
Chapter 9 Applying UML and Patterns -Craig Larman
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
1 Structuring Systems Requirements Use Case Description and Diagrams.
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.
Systems Analysis and Design in a Changing World, Fourth Edition
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.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
Understanding Requirements
Copyright © Craig Larman All Rights Reserved Use Cases.
Larman chapter 61 Use cases Larman chapter 6. 2 Fig. 6.1.
Chapter 6: Structuring Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
1 Object Oriented Analysis and Design System Events & Contracts.
Jan Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
Use Case Modeling - II Lecture # 27.
Lec-5 : Use Case Diagrams
System Sequence Diagrams and Operation Contracts
Creating Use Cases.
UML Use Case Diagrams.
Writing Use Cases.
Object-Oriented Analysis Principles using UML
Start at 17th March 2012 end at 31th March 2012
Object Oriented Analysis and Design
Use Case Model Use case diagram – Part 2.
Using Use Case Diagrams
Use Case Modeling.
Object-Oriented Software Engineering
Use cases Dr. X.
Presentation transcript:

Use cases

Applying UML and Patterns :Craig Larman

N Overview Use cases describe domain processes in a structured prose format. We explore basic skills. Definitions. Notation. Guidelines. Practice.

Objectives Read and create high-level and expanded format use cases. Distinguish between essential and real use cases.

Use cases They are used to discover and record requirements. Use cases are not diagrams they are text documents. Use cases are one way of capturing the functional requirements. Use cases are text stories of some actors using a system to meet goals.

MOTIVATION: Comprehensible & Familiar Use cases are stories. A simple and familiar model that many people, especially non-technical, can easily relate to.

Use Cases They are a collection of related success and failure scenarios that describe an actor using a system to satisfy a goal. They must return an observable value to a particular actor.

scenarios A scenario is also called a use case instance. It is a specific sequence of actions and interactions between actors and the system. or It is one path through the system.

Actor An actor is someone with behavior. Think of actors in terms of Roles rather than job titles. Actors carry out use cases. A single actor carries out many use cases and many roles. There is one Primary actor and possibly several secondary actors.

Actors Actors can be: Roles of humans. Example: A Patron. Other computer systems. Example: The Visa network.

The three Common formats for Use cases. Brief: One paragraph summary of the main success scenario. Casual: multiple paragraphs that covers various scenarios. Fully dressed: All steps and sections are written in detail, and there are supporting sections such as preconditions and success guarantees. Also known as the expanded format.

Brief Use Case Name: Borrow Resources Actors: Patron (initiator), Librarian Description: The use case begins when the Patron arrives at the check-out with books and videos to borrow and submits them to the Librarian, who records the resources borrowed. The Patron then leaves with the resources.

Use Case Diagrams

Sample High-Level Primary Use Cases Name: Add Resources. Actors: Librarian. Description: The use case begins when the Librarian receives new resources (books and videos) to add to the catalog. The title, call number, and other information are recorded. Then the resources are placed on a shelf organized by resource type and call numbers.

Sample High-Level Primary Use Cases Other possible use cases. Return a Resource. Delete a Resource. Notify Overdue Patrons. Collect Fines.

GUIDELINES: Use Case Modeling It is common to group CRUD (Create, Read, Update, Delete) operations into one use case. Manage Users Name starts with a verb. All systems have a Start Up and Shut Down use case (perhaps trivial and low level).

Abstraction Levels of Use Cases

Essential versus Real Use Cases

Expanded Format Use Cases Describe the use case in greater detail. Can be written essential or real. Have the following components: Name. Starts with a verb. Description. From the high-level use case. Actors. Initiator and participants from high-level use case. Type. If decomposed, then super / sub (abstract). Also, primary / secondary, and essential / real.

Expanded Format Use Cases (continued) Have the following components (continued): Cross-references. Related use cases and system functions. Preconditions. Assumptions that must hold true. Stakeholders and their interests. Typical Course of Events. Most important section describes regular flow of events. Alternatives. Exceptional alternatives that might arise. Special requirements. : related non-functional requirements. Technology and data variation Frequency. Open Issues.

EBP for Use Case Levels Focus on use cases at the level of EBPs. “A task performed by one person in one place at one time, in response to a business event, which adds measurable business value and leaves the data in a consistent state.” Naively, can you apply the “boss test” for an EBP?

Here’s one in a brief format: Rent Videos. A Customer arrives with videos to rent. The Clerk enters their ID, and each video ID. The System outputs information on each. The Clerk requests the rental report. The System outputs it, which is given to the Customer with their videos.

EBP for Use Case Levels Boss: “What do you do all day?” For example, how do we know which of these is at a useful level? Negotiate a Supplier Contract Rent Videos Log In Start Up Boss: “What do you do all day?” Me: “I logged in!” Is Boss happy?

Size for Use Case Levels An EBP-level use case usually is composed of several steps, not just one or two. It isn’t a single step. Applying the EBP and size guidelines: Negotiate a Supplier Contract Rent Videos Log In Start Up The others can also be modeled as use cases. But, prefer a focus on the EBP level.

Use Case Diagrams

GUIDELINES: Use Case Diagrams

EXAMPLE: Fully Dressed Use Case UC1: Rent Video Level: User-level goal (EBP level)   Primary Actor: Clerk Preconditions: Clerk is identified and authenticated. Stakeholders and their Interests: Clerk: Wants accurate, fast entry. Customer: Wants videos, and fast service with minimal effort. Accountant: Wants to accurately record transactions. Marketing: Wants to track customer habits.

EXAMPLE: Fully Dressed Main Success Scenario (or Basic Flow or “Happy Path”): Customer arrives at a checkout with videos or games to rent. Clerk enters Customer ID. Clerk enters rental identifier. System records rental line item and presents item description.(Clerk repeats steps 3-4 until indicates done.) System displays total. Customer pays. System handles payment. Clerk requests rental report. System outputs it. Clerk gives it to Customer. Customer leaves with rentals and report.

EXAMPLE: Fully Dressed Extensions (or Alternatives): a*. At any time, System fails: Clerk restarts System logs in requests recovery from prior state 1a. New Customer. 1. Perform use case Manage Membership. 2a. Customer ID not found. 1. Cashier verifies ID. If entry error, reenter, else Manage Membership. 2b. Customer has unpaid fines (usually for late returns). 1. Pay Fines.

EXAMPLE: Fully Dressed Special Requirements: Language internationalization on the display messages and rental report. Large text on display. Visible from 1 m. Technology and Data Variations: ID entries by bar code scanner or keyboard. Frequency: Near continuous Open Issues: Should we support a magnetic stripe cards for customer ID, and allow customer to directly use card reader?

Use-Case Miscellany The first line of a use case course of events should describe the event that starts the use case. Example: This use case begins when the <actor> <generates an input event> Start the use-case name with a verb. Purchase … Borrow …

generalization A use case generalization shows that one use case is simply a special kind of another. A child can be substituted for its parent whenever necessary. Generalization appears as a line with a triangular arrow head toward the parent use case.

Include relationships Includes are especially helpful when the same use case can be factored out of two different use cases. In the diagram, include notation is a dotted line beginning at base use case ending with an arrows pointing to the include use case. The dotted line is labeled <<include>>.

extend relationship An extend relationship indicates that one use case is a variation of another. Extend notation is a dotted line, labeled <<extend>>, and with an arrow toward the base case. The extension point, which determines when the extended case is appropriate, is written inside the base case.