Use Cases and Scenarios

Slides:



Advertisements
Similar presentations
Use Cases and Scenarios
Advertisements

CPSC 333: Foundations of Software EngineeringJ. Denzinger 2.2. Use Cases: Scenario based requirements modeling Recommended: Booch, Rumbaugh, Jacobson:
Use Case Model Shinta P.. UML Actor An actor is behaviored classifier which specifies a role played by an external entity that interacts with the subject.
© 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.
Use cases.
Information System Engineering
UML: Use Cases Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
CT1404 Lecture 2 Requirement Engineering and Use Cases 1.
Drawing System Sequence Diagrams
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
© Betty H.C. Cheng. This presentation is available free for non-commercial use with attribution under a creative commons license. Use Cases and.
Use Cases & Requirements Analysis By: Mostafa Elbarbary.
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Modeling System Requirements with Use Cases
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 More on use cases System sequence.
The first step in getting what you want is to decide what you want.
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
A Student Guide to Object- Orientated Development
USE Case Model.
RUP Requirements RUP Artifacts and Deliverables
Rational Unified Process (Part 1) CS3300 Fall 2015.
The Unified Modeling Language Part I Omar Meqdadi SE 2730 Lecture 6 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Chapter 6 – System Design II: Behavioral Models. 6.1 Models Models - what do you think of? 2.
Understanding User Requirements. Documenting Use Cases 2 At this stage of the exploration, the participants should be thinking of essential use cases.
System Specification Specify system goals Develop scenarios Define functionalities Describe interface between the agent system and the environment.
Requirements Engineering Requirements Elicitation Process Lecture-8.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Use Cases CS/SWE 421 Introduction to Software.
Use Cases 1. Last week  Introduction to software engineering  How is it different from traditional engineering?  Introduction to specification  Operational.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 20. Review Software Requirements Requirements Engineering Process.
1 Unified Modeling Language Michael K. Wildes University of California, Riverside – Extension Program Presentation 2.
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
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.
OOSE Use Case. Requirement Functional: –Features, capabilities, and security Non Functional: –Usability: Human factors, help, and documentation –Reliability:
CS 3610: Software Engineering – Fall 2009 Dr. Hisham Haddad – CSIS Dept. Class Project OO Design Document Here is what you need to do for your class project.
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
♦ Use Case Model  Detailled use case - Important  Use case diagram- Refactoring Use case diagram  > 1 Last Lectures.
2131 Structured System Analysis and Design By Germaine Cheung Hong Kong Computer Institute Lecture 8 (Chapter 7) MODELING SYSTEM REQUIREMENTS WITH USE.
Systems Analysis and Design in a Changing World, Fourth Edition
Use Case Model Use case diagram.
Business Analysis with For PG MDI, Gurgaon Kamna Malik, Ph.D.
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.
Requirements Management with Use Cases Module 10: Requirements Across the Product Lifecycle Requirements Management with Use Cases Module 10: Requirements.
R R R CSE870: Advanced Software Engineering: UML-- Use Cases1 Use Cases and Scenarios.
Connecting with Computer Science2 Objectives Learn how software engineering is used to create applications Learn some of the different software engineering.
Phase 6 Start: Saturday14 April End: Saturday 21 April
Use Cases Todd S. Bacastow Professor of Practice John A. Dutton e-Education Institute The Pennsylvania State University.
Understanding Requirements
UML (Unified Modeling Language)
Use Case Diagrams Lecture Oo14 Use Cases. References n Booch, et al, The Unified modeling Language User’s Guide, AWL, 1999, Chapt 16 & 17 n Fowler & Scott,
USE CASE Pertemuan 7 Matakuliah: Konsep object-oriented Tahun: 2009.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Chapter 7 Part II Structuring System Process Requirements MIS 215 System Analysis and Design.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
Object Modeling Approach
Use Cases and Scenarios
Department of Computer Science
Webapp Design with System Sequence Diagrams
Use Case Model Use case diagram.
UML Use Case Diagrams.
Start at 17th March 2012 end at 31th March 2012
Object Modeling Approach
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Use Cases 1.
Use Case Model Use case diagram – Part 2.
Using Use Case Diagrams
Use Case Document Example
Requirements Very High level specification of what system should do
Presentation transcript:

Use Cases and Scenarios

We Will Cover What is a use-case Use-Case diagrams Use-case versus user interaction Use-Case diagrams The constructs in the use-case diagrams Capturing the use-case High-level use-case Extended use-case Difference between use case and scenario

What is a Use-Case A use-case captures some user visible function This may be a large or small function Depends on the level of detail in your modeling effort A use-case achieves a discrete goal for the user Examples Format a document Request an elevator How are the use cases found (captured or elicited)?

User Goals versus User Interactions Consider the following when formatting a document Define a style Change a style Copy a style from one document to the next versus Format a document Ensure consistent formatting of two documents The latter is a user goal Something the user wants to achieve The former are user interactions Things the user does to the system to achieve the goal

Goals and Interactions There is a place for both goals and interactions Understand what the system shall do Capture the user goals Understand how the user will achieve the goals Capture user interactions Sequences of user interactions Thus, start with the user goals and then refine the user goals into several (many) user interactions

Use-Case Diagrams (POST) POST: Point of Sale Terminal Customer Cashier Buy Item Log In Refund a Purchased Item POST Use Case System Boundary Adapted from Larman “Applying UML and Patterns”

Another Example Financial Trading System Set Limits Update Accounts Salesperson Trader Accounting System Trading Manager Set Limits Update Accounts Analyze Risk Price Deal Capture Deal Limit Exceeded Valuation «includes» «extends» Adapted from Fowler “UML Distilled”

Includes and Extends Extends Includes A use-case is similar to another one but does a little bit more Put the normal behavior in one use-case and the exceptional behavior somewhere else Capture the normal behavior Try to figure out what can go wrong in each step Capture the exceptional cases in separate use-cases Makes it a lot easier to understand Includes You have a piece of behavior that is similar across many use cases Break this out as a separate use-case and let the other ones “include” it Examples include Valuation Validate user interaction Sanity check on sensor inputs Check for proper authorization

Includes You have a piece of behavior that is similar across many use cases Break this out as a separate use-case and let the other ones “include” it Examples include Valuation Validate user interaction Sanity check on sensor inputs Check for proper authorization

Extends A use-case is similar to another one but does a little bit more Put the normal behavior in one use-case and the exceptional behavior somewhere else Capture the normal behavior Try to figure out what can go wrong in each step Capture the exceptional cases in separate use-cases Makes it a lot easier to understand

Setting the System Boundary The system boundary will affect your actors and use-cases Adapted from Larman “Applying UML and Patterns”

Adapted from Larman “Applying UML and Patterns” A Different Boundary Let us view the whole store as our system Store Buy Item Refund a Purchased Item Customer Adapted from Larman “Applying UML and Patterns”

Embedded System “Onion Skin” * Perception/Action Sensors/Actuators Interfaces System

Adapted from Larman “Applying UML and Patterns” Partial POST Adapted from Larman “Applying UML and Patterns”

POST Use-Case Use case: Buy Item Actors: Customer (initiator), Cashier Type: Primary Description: The Customer arrives at the checkout with items to purchase. The Cashier records the purchase items and collects a payment. On completion the Customer leaves with the items

POST Expanded Use-Case Use case: Buy Item Actors: Customer (initiator), Cashier Type: Primary and essential Description: The Customer arrives at the checkout with items to purchase. The Cashier records the purchase items and collects a payment. On completion the Customer leaves with the items. Cross Ref.: Requirements XX, YY, and ZZ Use-Cases: Cashier must have completed the Log In use-case

Typical Course of Events Actor Action This use-case begins when a user arrives at the checkout The cashier records purchase items The cashier collects payment The user leaves with items

The Home Heating System * Temp Sensor Water Pump Water Valve Hot Water Home Controller Burner Fuel Valve 90 80 70 60 50 On Off Fuel Control Panel Temp Sensor

Home Heating Use-Case Diagram

Home Heating Use-Cases Use case: Power Up Actors: Home Owner (initiator) Type: Primary and essential Description: The Home Owner turns the power on. Each room is temperature checked. If a room is below the the desired temperature the valve for the room is opened, the water pump started. If the water temp falls below threshold, the fuel valve is opened, and the burner ignited. If the temperature in all rooms is above the desired temperature, no actions are taken. Cross Ref.: Requirements XX, YY, and ZZ Use-Cases: None

Modified Home Heating MH Home Heating Power Up Temp. High «includes» Power Down Adjust Temp «includes» Home Owner «includes» Change Temp. Temp. Low MH

Modified: Home Heating Use-Cases * Use case: Power Up Actors: Home Owner (initiator) Type: Primary and essential Description: The Home Owner turns the power on. Perform Adjust Temp. If the temperature in all rooms is above the desired temperature, no actions are taken. Cross Ref.: Requirements XX, YY, and ZZ Use-Cases: Perform Adjust Temp

Modified: Home Heating Use-Cases * Use case: Adjust Temp Actors: System (initiator) Type: Secondary and essential Description: Check the temperature in each room. For each room below target, open room valve, start pump if not started. If water temp falls below threshold, open fuel value and ignite burner. Cross Ref.: Requirements XX, YY, and ZZ Use-Cases: None

HACS Homework assignment and collection are an integral part of any educational system. Today, this task is performed manually. What we want the homework assignment distribution and collection system (HACS for short) to do is to automate this process. HACS will be used by the instructor to distribute the homework assignments, review the students’ solutions, distribute suggested solution, and distribute student grades on each assignment. HACS shall also help the students by automatically distributing the assignments to the students, provide a facility where the students can submit their solutions, remind the students when an assignment is almost due, remind the students when an assignment is overdue.

HACS Use-Case Diagram

HACS Use-Cases Use case: Distribute Assignments Actors: Instructor (initiator) Type: Primary and essential Description: The Instructor completes an assignment and submits it to the system. The instructor will also submit the due date and the class the assignment is assigned for. Cross Ref.: Requirements XX, YY, and ZZ Use-Cases: Configure HACS must be done before any user (Instructor or Student) can use HACS

Alternate HACS

Alternate HACS Use-Cases Use case: Distribute Assignments Actors: Instructor (initiator), Student Type: Primary and essential Description: The Instructor completes an assignment and submits it to the system. The instructor will also submit the delivery date, due date, and the class the assignment is assigned for. The system will at the due date mail the assignment to the student. Cross Ref.: Requirements XX, YY, and ZZ Use-Cases: Configure HACS must be done before any user (Instructor or Student) can use HACS

When to use Use-Cases In short, always!!! Requirements is the toughest part of software development Use-Cases is a powerful tool to understand Who your users are (including interacting systems) What functions the system shall provide How these functions work at a high level Spend adequate time on requirements and in the elaboration phase

How it Fits Together Preliminary Investigation Report Requirements Specification Use-Cases a. All High Level b. Some Expanded Prototypes Use-Case Diagram Budget, Schedule Draft Conceptual Model Adapted from Larman “Applying UML and Patterns” Glossary (data dictionary)