SE-565 Software System Requirements IV. Use Cases

Slides:



Advertisements
Similar presentations
Use-Cases.
Advertisements

Use Case Diagrams Damian Gordon.
09/04/2015Unit 2 (b) Back-Office processes Unit 2 Assessment Criteria (b) 10 marks.
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.
Use Case Modeling SJTU. Unified Modeling Language (UML) l Standardized notation for object-oriented development l Needs to be used with an analysis and.
Information System Engineering
1 Dilbert Scott Adams Writing Effective Use Cases, Alistair Cockburn Use Cases: Requirements in Context, Daryl Kulak Applying Use Cases: A Practical.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
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.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
Use Cases 2 ENGR ♯10 Peter Andreae
Welcome to Century Equipment’s Shop Online Website! This presentation will highlight some of it’s key features.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
Use Case modelling 1. Objectives  Document user requirements with a model  Describe the purpose of an actor and a use case  Construct a use case model.
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
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.
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
Payroll System Bank System Any bank(s) to which direct deposit transactions are sent. Employee A person that works for the company that owns and operates.
Faculty of Computer & Information
OOSE Use Case. Requirement Functional: –Features, capabilities, and security Non Functional: –Usability: Human factors, help, and documentation –Reliability:
Requirements Analysis and Design Engineering Southern Methodist University CSE 7313.
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
Object Oriented Analysis & Design & UML (Unified Modeling Language) 1 Part II: Requirements The requirements workflow Use case modeling Advanced.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
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.
Business Analysis with For PG MDI, Gurgaon Kamna Malik, Ph.D.
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.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
Understanding Requirements
UML (Unified Modeling Language)
Chapter 6: Structuring Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
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.
Jan Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
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.
1 Case Study and Use Cases for Case Study Lecture # 28.
Engineering Quality Software Week02 J.N.Kotuba1 SYST Engineering Quality Software.
Using Use Case Diagrams
CMPE 280 Web UI Design and Development August 29 Class Meeting
Use Case Modeling - II Lecture # 27.
Systems Analysis and Design in a Changing World, 6th Edition
Use Cases Discuss the what and how of use cases: Basics Benefits
Storyboarding and Game Design SBG, MBG620 Full Sail University
Use Case Model.
UML Use Case Diagrams.
OO Domain Modeling With UML Class Diagrams and CRC Cards
The Fulfillment Process
Use Case Modeling - techniques for detailing use cases
Concepts, Specifications, and Diagrams
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Systems Analysis and Design in a Changing World, 6th Edition
Use Cases 1.
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Software Design Lecture : 15.
Requirements Management
Using Use Case Diagrams
Use Case Document Example
Seminar 2 Design of Informatics Systems
Requirements Very High level specification of what system should do
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Systems Analysis and Design I
Object-Oriented Software Engineering
Simplify Your Sales Process
Presentation transcript:

SE-565 Software System Requirements IV. Use Cases Dr. Jiacun Wang Department of Software Engineering Monmouth University 11/13/2018 Jiacun Wang

Objectives To introduce you to a user-centered requirements elicitation method - use cases To show you the components of the use case model and how you can identify them To explain the relationship between use cases and scenarios To explain the need for generalization mechanisms in structuring use cases diagrams 11/13/2018 Jiacun Wang

Topics Identifying actors Identifying use cases Internal structure of a use case Generalization mechanisms 11/13/2018 Jiacun Wang

Use Cases Are an example of user-centered analysis, a methodology for capturing user’s needs (the focus is on what users need to accomplish, in contrast to the traditional elicitation approach of asking users what they want the system to do). Are a sequence of interactions between the system and one or more actors, in response to some initial stimulus by one of the actors. Examples of use cases: installing a database printing a report adding a user to the database 11/13/2018 Jiacun Wang

Use Cases Used in: requirements design testing user guides project scheduling 11/13/2018 Jiacun Wang

Identifying Actors Actors are anything that interfaces with the system. Examples: people, software, hardware, other systems. Each actor defines a particular role Actors are always external to your system 11/13/2018 Jiacun Wang

Identifying Actors Each entity outside the system may be represented by 1 or more actors 1 physical person - several actors (several roles) or several persons - one actor (one role) Example: Mary : customer + employee Mary + Bill : customer 11/13/2018 Jiacun Wang

Identifying Actors Questions for Identifying actors : Who uses the system? Who installs the system? Who starts up the system? Who maintains the system? Who shuts down the system? What other systems use this system? Who gets the information from this system? Who provides information to the system? Does anything happen automatically at a present time? 11/13/2018 Jiacun Wang

Class exercise Identify the actors for a mail order system. 11/13/2018 Jiacun Wang

Identifying use cases Use cases describe the system functionalities The name of the use case states the user task in the form “verb + object” A use case is always started by an actor, unless it is triggered by a change in the system’s state A use case is not a single scenario Go through all of the actors and identify use cases for each one 11/13/2018 Jiacun Wang

Identifying use cases (cont.) Examples: What functionalities will the actor want from the system Create, read, update, delete information that the system stores Actor notification when system’s internal state is changing System notification about external events Diagnostics Installation, training, maintenance Changing a business process 11/13/2018 Jiacun Wang

Use case diagram 11/13/2018 Jiacun Wang

Use case diagram 11/13/2018 Jiacun Wang

Class exercise Identify the use cases for the mail order system. Draw the use case diagram Find the boundaries of the system: what things are inside your system (you need to create them) and what things are outside your system (you don’t need to create them, but you need to interface with them) 11/13/2018 Jiacun Wang

Use cases - Internal structure Precondition Flow of events basic path alternative paths Post condition must be true no matter which branch or alternative is followed for the use case Special requirements 11/13/2018 Jiacun Wang

Use Case Example Withdraw Money Use Case Introduction Withdraw Money lets a bank Customer withdraw money from an ATM. Precondition: A valid Customer is identified. Flow of Events: 1. The use case starts when the Customer selects Withdraw Money. 2. The Customer chooses how much to withdraw and from which account. 3. The system responds with how much can be withdrawn from that account. 4. The system dispenses the amount. 5. The system deducts the amount from the account and the use case ends. 11/13/2018 Jiacun Wang

Use Case Example Alternative Paths: In step 5, if the deduction results in an overdraft, it is handled accordingly to {Account Overdrawn}. Postcondition: The transaction has been recorded in the system. Special requirements: The following are maximum response times as the system: verifies the identity of the Bank Customer presents the balance of Account that the Bank Customer has chosen dispenses the amount and deducts the amount from the Account. Whenever the server does not respond within 5 seconds, the client considers the server to be down and cancels the use case. There may be no more than 100 instances of the use case Withdraw Money executing in parallel on this server. 11/13/2018 Jiacun Wang

Flow of events Alternative paths stated either as if statement in the basic path or in the alternative paths section Use explicit repetition constructs for and while to repeat a step or multiple steps 11/13/2018 Jiacun Wang

Scenarios Describe one path through the use case (an instance) Example: an order that is complete, with the correct payment arrives an order that is missing a payment arrives Primary scenarios - the basic use case functionality Secondary scenarios - alternatives + error conditions 11/13/2018 Jiacun Wang

Primary scenarios Written as if everything goes right: no errors, no branching or alternatives Written from the actor’s point of view Start by indicating who begins the scenario and how Continue listing steps Finish by indicating how the scenario ends Update the list of actors and use cases 11/13/2018 Jiacun Wang

Primary scenarios (cont.) The steps will be ordered by time If the steps can run concurrently, make it clear in the beginning of the scenario NFRs can be included either in a “Special Requirements” section of the use case OR in an “Other requirements” document 11/13/2018 Jiacun Wang

Primary scenarios (cont.) Presentation styles: informal numbered sequence of steps Pseudocode - UML activity diagrams 11/13/2018 Jiacun Wang

Informal Text Form of Use Case Cancel Order use case When the customer rep receives a request to cancel an order, the customer rep finds the order in the system and marks it canceled. Then a request is sent to the accounting system to credit the customer’s account. 11/13/2018 Jiacun Wang

Numbered Sequence of Steps Cancel Order use case 1. The use case begins when the customer rep receives a request to cancel an order. 2. The customer rep enters an order ID. 3. The customer rep presses “Find” to find the order in the system. 4. The system will display that order. 5. The system marks the order canceled. 6. The accounting system is notified to credit the customer’s account and the use case ends. 11/13/2018 Jiacun Wang

Pseudocode Form of Use Case Cancel Order use case Order = Customer.CancelOrder (OrderNumber) Order. Status = canceled Accounting.SendRefund (Customer, Order. Amount) 11/13/2018 Jiacun Wang

Activity Diagram Example – Place Order Use case Log In Order Form Displayed Enter Name and Address Product Description and Price Displayed New Total Calculated Enter Credit Card Information [Place order selected] [Product code entered] [No more product codes] [product code entered] Submit Order Marked Pending Payment Information Sent to Accounting Confirmed Order ID [info complete] [payment good] 11/13/2018 Jiacun Wang

Secondary Scenarios Alternative scenarios Exception scenarios Documentation styles: include the alternative/exceptions in either of these choices: the basic path of a primary scenario the alternative path section separate secondary scenarios 11/13/2018 Jiacun Wang

Exercises Class exercise: Write a primary and a secondary scenario for the mail order system Group exercise: write a primary and a secondary scenario for the automated library system. 11/13/2018 Jiacun Wang

Generalization mechanisms Withdraw Money Overdraft Management <<Extends>> [amount to be withdrawn > balance] Deposit Transfer Between Accounts Validate User <<includes>> Extends Includes Inheritance between actors, use cases Interfaces for actors, use cases 11/13/2018 Jiacun Wang

Extends Relationships Useful for changes and additions to an existing use case When you have an optional sequence of events you want to add to a use case – for customizing a product, or when working on a later version of an existing product Start by determining what you want to add and where in the use case that needs to be modified The use case being extended does not change Update the use case diagram to include extension points, and the conditional expression that would trigger the extending use case Write a use case describing what will happen at the extension point (the extending use case) 11/13/2018 Jiacun Wang

Extends Relationships Can have more extensions from one point. The order of execution is undefined. Exercise: Write an extending use case for the Place Order Use Case. The extending use case should calculate the product price when a product is on sale. 11/13/2018 Jiacun Wang

Place Order Use Case The use case begins when the customer selects Place Order The customer enters his or her name and address If the customer enters only the zip code, the system supplies the city and state. The customer enters product codes for products to be ordered. For each product code entered The system supplies a product description The system supplies a product price The system adds the price of the item to the total end loop The customer enters credit card payment information The customer selects Submit The system verifies the information, saves the order as pending, and forwards payment information to the accounting system. When payment is confirmed, the order is marked confirmed, an order ID is returned to the customer, and the use case ends. 11/13/2018 Jiacun Wang

Includes Relationships Abstracts the common behavior from several use cases The common behavior is introduced by the Include keyword Can have as many levels of include as you need No limit on the number of use cases that can be “included” Exercise: Cancel Order includes Search Order 11/13/2018 Jiacun Wang

Inheritance Relationships Between actors or between use cases Inheritance between Actors: An actor fills the same roles as another actor, and some other additional roles It interacts with the same use cases in the same way, therefore we can simplify the use case diagram by using this inheritance relationship 11/13/2018 Jiacun Wang

Inheritance between Actors-Example Private Customer Bank Corporate Withdraw money Deposit money Loan for purchasing other companies 11/13/2018 Jiacun Wang

Inheritance Relationship (cont.) Inheritance between Use cases One use case is a specialized version of another use case Can be documented in two ways: The parent use case is just a description, while the specialized use cases contain the detailed flow of events. The parent use case is written as a complete flow of events. The specialized use cases just describe how they are different from the parent use case. 11/13/2018 Jiacun Wang

Examples of Inheritance in a Use Case Diagram Customer Place Order Place Web Order Get Status on Order Place Telephone Order Customer Rep Run Sales on Order 11/13/2018 Jiacun Wang

Use Cases Level of Detail Determine who needs the use case and how it will be used. It may be used by managers, end users, or developers (see next slides for examples of each category of users and the difference in the level of detail of use cases). 11/13/2018 Jiacun Wang

Business Process Use case The use case begins when the customer places an order for products with the customer service department. The customer service department sends the payment information for the order to the accounting department The accounting department updates National Widgets’ accounts and deposits the payments in the bank. The customer service department sends the order to the warehouse department The warehouse department collects the items for the order and sends them with the shipping address to the shipping department The shipping department packages up the items with the shipping address and gives the package to a shipping company for delivery to the customer, and use case ends. 11/13/2018 Jiacun Wang

Place Order Use case – Actor View The use case begins when the customer selects Place Order The customer enters his or her name and address If the customer enters only the zip code, the system supplies the city and state. The customer enters product codes for products to be ordered. For each product code entered The system supplies a product description and price The system adds the price of the item to the totalend loop The customer enters credit card payment information The customer selects Submit The system verifies the information, saves the order as pending, and forwards payment information to the accounting system. When payment is confirmed, the order is marked confirmed, an order ID is returned to the customer, and the use case ends. 11/13/2018 Jiacun Wang

Place Order Use case – Developer View The use case begins when the customer selects Place Order The customer enters his or her name and address If the customer enters only the zip code, the system uses the zip code to query the U.S. Post Office online repository to get the city and state, the system adds the city and state to the order The customer enters product codes for products to be ordered For each product code entered The system uses the product code to query the inventory system software for a product description and price. The system adds the description and price to the order. The system queries the customer for product quantity. The customer enters a quantity for the product. The system adds the price of the item to the subtotal of the order 11/13/2018 Jiacun Wang

Place Order Use case – Developer View (cont.) The customer enters credit card payment information The customer selects Submit The system makes sure that all necessary data is entered, which must include a complete shipping address, credit card payment information, and at least one product. The system saves the order as pending and forwards payment information and the subtotal to the accounting system. The accounting system calculates the tax and shipping amounts and returns a total for the order along with an indication of success in accepting the payment. The system marks the order confirmed, returns the total and an order ID to the customer, and the use case ends. 11/13/2018 Jiacun Wang

Use cases traps to avoid Too many uses cases – you might not be writing them at the appropriate level of abstraction Highly complex use cases – they might become incomprehensible Including user interface design in the use cases – Defer user interface specifics to the design stage. Say “system presents choices” instead of “system displays drop-down list” Including data definitions in the use cases – include them instead in the project’s data dictionary. 11/13/2018 Jiacun Wang

Summary Use cases are a method of capturing users needs in a user-centered approach Actors are anything that interfaces with the system Use cases are a sequence of interactions between the system and one or more actors, in response to some initial stimulus by one of the actors A use case is not a single scenario A use case is organized as preconditions, flow of events and postconditions A use case contains one primary scenario and optionally, secondary scenarios Use cases can be structured using generalization mechanisms such as includes, extends, inheritance 11/13/2018 Jiacun Wang