This section has been adapted from Dr. Scott Fleming of U. Memphis Details about Use Cases.

Slides:



Advertisements
Similar presentations
Use-Cases.
Advertisements

Object-Oriented Analysis and Design Evolutionary Requirements.
CPSC 333: Foundations of Software EngineeringJ. Denzinger 2.2. Use Cases: Scenario based requirements modeling Recommended: Booch, Rumbaugh, Jacobson:
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Writing Use Cases: Requirements in Context
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
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.
COMP 350: Object Oriented Analysis and Design Lecture 3 Case Studies, Inception & Use Cases References: Craig Larman Chapters 3-6.
Use-case Modeling.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
Fall 2009ACS-3913 Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
Written by: Zvika Gutterman Adam Carmi
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 Written by: Zvika Gutterman Adam Carmi.
Adding the Detail Filling in Use Case Templates. Use Case Template The use case diagram is important for visualizing a system and as a communication tool.
חוזים – Contracts 1. Larman – Chapter 10 – SSDs 10.2 What are System Sequence Diagrams? (introduction) Use cases describe how external actors interact.
Use Case Development Scott Shorter, Electrosoft Services January/February 2013.
The first step in getting what you want is to decide what you want.
USE Case Model.
System Sequence Diagrams
RUP Requirements RUP Artifacts and Deliverables
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Use Cases Descriptions and Use Case Models.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
Object-Oriented Analysis - Instructor Notes
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
1 Objectives  Describe design constraints.  Identify methods of specifying functional requirements.  Describe techniques for writing and structuring.
ZEIT2301 Design of Information Systems Functional Design: Use Cases School of Engineering and Information Technology Dr Kathryn Merrick.
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.
Requirements Specification for Lab3 COP4331 and EEL4884 OO Processes for Software Development © Dr. David A. Workman School of Computer Science University.
Use Cases 1. Last week  Introduction to software engineering  How is it different from traditional engineering?  Introduction to specification  Operational.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
More on Class Diagrams. Visibility Both attributes’ and methods’ visibility can be defined in the class diagram: + public/derived - privateunderlinedstatic.
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.
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:
2. Inception 6. Use-Case Model: Writing Requirements in Context.
Requirements Reference: Chapters 5, 6, & 8. CMSC 345, Fall Objectives To introduce the concepts of user and system requirements To explain functional.
Requirements Analysis and Design Engineering Southern Methodist University CSE 7313.
® 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.
Yarmouk University Department of Computer Information Systems CIS 499 Yarmouk University Department of Computer Information Systems CIS 499 Yarmouk University.
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.
1 Version /05/2004 © 2004 Robert Oshana Requirements Engineering Use cases.
Behavior Modeling (based on Alistair Cockburn book) PA116 – L11 (c) Zdenko Staníček, Sept 2010.
Adv. Use cases Actor generalization – general and special actors Use case generalization – general and special use cases Include and extend relationships.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
UML - Development Process 1 Software Development Process Using UML.
Larman chapter 61 Use cases Larman chapter 6. 2 Fig. 6.1.
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.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
Jan Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
Use Cases Discuss the what and how of use cases: Basics Examples Benefits Parts Stages Guidelines.
CMPE 280 Web UI Design and Development August 29 Class Meeting
Systems Analysis and Design in a Changing World, 6th Edition
Use Cases Discuss the what and how of use cases: Basics Benefits
System Sequence Diagrams and Operation Contracts
CSC480 Software Engineering
Use Case Modeling.
Systems Analysis and Design in a Changing World, 6th Edition
Use Case Document Example
Use Case Modeling.
Use Case Modeling Part of the unified modeling language (U M L)
Use cases Dr. X.
Presentation transcript:

This section has been adapted from Dr. Scott Fleming of U. Memphis Details about Use Cases

What are “fully dressed” use cases? All steps and variations written in detail Structured template – Tend toward the formal – However, rough sketching can be useful

“Fully dressed” UC template UC name Scope Level Primary actor Stakeholders and interests Preconditions Success guarantees Main success scenario Extensions (or alternative flows) Special requirements Technology and data variations list Frequency of occurrence Miscellaneous

Use Cases are a Bundle Each use case is a bundle of scenarios Usually include a “main success scenario” and “exception scenarios”

Use Case Name Start with a verb Examples: – Read Article – Write Article – Moderate Comment

Scope Will always be the software system under development for us Example: – Online Magazine Content Management System There also business use cases, but we don’t care about them in this class

Level Two levels that we care about: User-goal level: describes scenarios that fulfill the goals of the primary actor – Most common Subfunction level: describes substeps to support a user goal – Used to factor out common text from other use cases – Good for handling common use cases like “Log in”

Primary actor Principal actor that calls upon system services to fulfill a goal – Usually human, but not always

Stakeholders and interests list “The [system] operates a contract between stakeholders, with the use cases detailing the behavioral parts of that contract… The use case, as the contract of behavior, captures all and only the behaviors related to satisfying the stakeholders’ interests” –Cockburn (2001) Example stakeholders and interests: – Subscriber: Wants interesting and amusing articles because the subscriber wants to get money’s worth; wants to be involved in a community of like-minded users to discuss topics and provide feedback to the magazine – Editor: Wants high-quality written articles because low- quality articles reduce reader confidence and satisfaction

Stakeholders and interests list “The [system] operates a contract between stakeholders, with the use cases detailing the behavioral parts of that contract… The use case, as the contract of behavior, captures all and only the behaviors related to satisfying the stakeholders’ interests” –Cockburn (2001) Example stakeholders and interests: – Subscriber: Wants interesting and amusing articles because the subscriber wants to get money’s worth; wants to be involved in a community of like-minded users to discuss topics and provide feedback to the magazine – Editor: Wants high-quality written articles because low- quality articles reduce reader confidence and satisfaction Contains a Why description!

Preconditions Things that must always be true be the scenario begins – May imply completion of another UC’s scenario Examples: – User has logged in – Comment exists in moderation queue Skip uninteresting or obvious preconditions – Anti-example: Editor has editing experience – Anti-example: Subscriber can use web site

Success guarantees (postconditions) Things that must be true after the success scenario or some alternative path – Should meet the needs of all stakeholders Example: – User has access to subscriber-only content – Comment appears in article’s comment thread – Edits to article are saved

Main success scenario Sequence of steps in a scenario of a successful typical use of the system Three types of steps: – Interaction between actors – Validation (usually by system) – State change of system (e.g., recording or modifying something) – (Additionally, step 1 may indicate a trigger event) Most actor actions should have a system response Defer conditionals to Extensions section Idiom: capitalize actors names

Main Success Scenario 1: Post Comment on Article 1.Subscriber access article 2.System presents article to subscriber, with comments thread 3.Subscriber presses “Post comment” 4.System confirms that subscriber is permitted to post comments 5.System presents text editor 6.Subscriber enters comment text 7.Subscriber submits comment 8.System records subscriber name, date of comment, comment text, and article that was commented on 9.System posts comment at end of comment thread

Extensions (or alternative flows) All other scenarios and branches – May end in success or failure Example: – 1a. Used filtered language [words in the comment text on filtered list] 6.Subscriber writes word on filtered word list 7.??? 8.System shows the text editor, the error message, “Please do not use these words in your post!”, and the words in the editor highlighted – 1b. Subscriber is banned from posting comments [subscriber is on a “banned from posting” list] 3.Subscriber presses “Post comment” 4.System identifies that the subscriber is not permitted to post comments 5.System shows error message, “You are not allowed to post comments.” – Guideline: write conditions as something that can be detected by system or actor

Extensions (or alternative flows) All other scenarios and branches – May end in success or failure Example: – 1a. Used filtered language [words in the comment text on filtered list] 6.Subscriber writes word on filtered word list 7.??? 8.System shows the text editor, the error message, “Please do not use these words in your post!”, and the words in the editor highlighted – 1b. Subscriber is banned from posting comments [subscriber is on a “banned from posting” list] 3.Subscriber presses “Post comment” 4.System identifies that the subscriber is not permitted to post comments 5.System shows error message, “You are not allowed to post comments.” – Guideline: write conditions as something that can be detected by system or actor Contains the condition Numbering starts at the point from the main success scenario

Extensions (cont’d) At end, the extension merges back with the main success scenario unless the extension indicates otherwise Complex extensions might be better expressed as a separate UC Example: a condition that is possible during any step of the main scenario: – *a. System crashes… Example: branching to another use case: – 2c. Author performs Edit Article in response to editor feedback

Special requirements Non-functional requirements relevant to the UC – Ex: Section 508 (web accessibility), HIPAA (health information privacy), etc Examples: – Every image must have associated alternative text for screen readers – Identifiable information of patients cannot be disclosed to non-employees

Technology and data variations list Constraints on how to build the system – Typically imposed by the customer Examples (reference relevant steps): – 4a. System must be compatible with Internet Explorer 8, Chrome 22, Safari 4, and Firefox 17 – 5a. System will present its mobile user interface when accessed using a mobile device with a four inch screen or smaller

How could creating “fully dressed” use cases be useful? (Why write them?)

How could creating “fully dressed” use cases be useful? Aid for thinking through what to build Help with detailed planning Reveal other use cases ? Documenting requirements ? ? Communicating with customer ? Project-specific costs/benefits very important to consider!

Requirements derived from a Use Case FR 1: Subscriber posts comment FR 1.1: Subscriber can post a comment associated with an article FR 1.2: Every comment appears at the bottom of the article text FR 1.3: Comment stores the comment text, the subscriber name, the comment date of posting, and the associated article identifier FR 1.4: Comments containing offensive words have posting restrictions FR 1.4.1: Comments posted by subscribers may not contain offensive words FR 1.4.2: Comments posted by moderators may contain Offensive Words FR 1.4.3: Offensive words appear on the “offensive words list” This might not be necessary depending on the project. Some developers are good at identifying necessary information from the use case directly.

Consider this motivating example At requirements workshop, an editor says she needs to “log in to the system” Is he making assumptions about the solution? How might that limit you, as the designer? How can you prevent customers from accidentally imposing unnecessary requirements?

Guideline: Write in essential style Express narrative at level of – user’s intentions and – system’s responsibilities Avoid UI details!!

What is wrong with this example? 1.Moderator enters ID and password in dialog box. 2.System authenticates Moderator 3.System displays the “edit users” window

What is wrong with this example? 1.Moderator enters ID and password in dialog box. 2.System authenticates Moderator 3.System displays the “edit users” window Limits possible designs by specifying UI

Here’s an essential-style example 1.Moderator identifies self. 2.System authenticates Moderator’s identity. This version leaves open novel solutions such as hardware authenticators that the other system could not accomodate

Here’s another motivating example Consider a UC step that says “The system generates a SQL INSERT statement for the sale…” What assumptions does the UC make? How might those assumptions limit you? How can you prevent customers from accidentally imposing these sorts of unnecessary requirements?

Guideline: Use black-box style Do not describe internal workings of system Say what the system does, not how it does it Think of system in terms of its responsibilities

How might you word this step using black box? The system generates a SQL INSERT statement for the sale…

How might you word this step using black box? The system generates a SQL INSERT statement for the sale… Like this: The system records the sale.

Consider this motivating quote “the software industry is littered with failed projects that did not deliver what people really needed” — Larman How can we make sure we deliver what our customers really need?

Guideline: Actor and actor-goal perspective Write requirements focusing on the users (actors) of a system, asking about their goals and typical situations – Look for different types of users Focus on understanding what the actor considers a valuable result

We know that the customers have difficulty effectively communicating requirements How can we discover requirements that the customer might not think to tell us about?

Guideline for finding requirements Ask probing questions that focus on: – The primary actors and their goals – The system boundary Prototyping and other activities

The System Mobile/web customer Such probing might produce a helpful diagram like this Phone system Phone support Service tech Phone customer Bicycle stations