Unit 3 Functional Requirements. Syllabus Introduction Features and usecases Use case Scenarios Documenting use cases Levels of details SRS Document.

Slides:



Advertisements
Similar presentations
Banking System Case Study Using COMET Alessandro Siena Università di Genova Dipartimento di Informatica e Scienze dellInformazione.
Advertisements

CMSC 345, Version 9/07 S. Mitchell Use Cases Concepts, Specifications, and Diagrams.
Withdrawal Transaction Use Case Primary Actor: Customer Pre-conditions: The customer must have a valid ATM card and PIN. Post-conditions: The customer.
Use Case Diagrams Damian Gordon.
Use Case & Use Case Diagram
Lecture 10 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Use Case Model. C-S 5462 Use case model describes what the user expects the system to do –functional requirements may describe only the functionalities.
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 CASE – ATM EXAMPLE Actors: ATM Customer ATM Operator Use Cases: The customer can withdraw funds from a checking or savings account query the balance.
SWE 214 (071) Use Case Diagrams Slide 1 Use Case Diagrams Examples.
Actors and use cases Use-case diagram Brief notation Prioritization Fully dressed notation Requirements Functional requirements  Use-cases.
CPSC 333: Foundations of Software EngineeringJ. Denzinger Small Test: Bank account manager System has to run on an automated teller machine. User must.
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Sequence Diagrams. Introduction A Sequence diagram depicts the sequence of actions that occur in a system. The invocation of methods in each object, and.
CS3773 Software Engineering Lecture 03 UML Use Cases.
Tutorial 2. What is a UML Use Case Diagram? Use case diagrams model the functionality of a system using actors and use cases. Use cases are services or.
Interaction Diagrams Activity Diagram State Machine Diagram
Use Cases & Requirements Analysis By: Mostafa Elbarbary.
Documenting Requirements using Use Case Diagrams
Object Oriented Analysis Process
COMP1007 Intro to Systems Requirements © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Intro to System Requirements Lecture 2 Use-Cases.
Requirements Analysis 4. 1 Use Case I b504.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis Use-Cases.
1 Lab Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
Use Cases 2 ENGR ♯10 Peter Andreae
Rational Unified Process (Part 1) CS3300 Fall 2015.
Software Waterfall Life Cycle Requirements Construction Design Testing Delivery and Installation Operations and Maintenance Concept Exploration Prototype.
Faculty of Computer & Information Software Engineering Third year
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
Faculty of Computer & Information
Requirements Reference: Chapters 5, 6, & 8. CMSC 345, Fall Objectives To introduce the concepts of user and system requirements To explain functional.
IS3320 Developing and Using Management Information Systems Lecture 9: Use Cases and Scenarios Rob Gleasure
Use Case Modeling Chapter 7 Part of Requirements Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
1 Structuring Systems Requirements Use Case Description and Diagrams.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
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.
1 Requirements Engineering From System Goals to UML Models to Software Specifications Axel Van Lamsweerde.
UML (Unified Modeling Language)
UML - Development Process 1 Software Development Process Using UML.
25/2/16. 2 DVD MovieVHS MovieVideo Game Rental Item Rental Invoice 1..* 1 Customer Checkout Screen CusID Name Address Phonenumber Transactionlist.
Lecture Outline Monday 23 rd February (Week 4) 3 – 3:10pm Review of Requirements Eng. and use cases 3:10 – 3:40pm Exercise on Use Case 3:40-4:40 Class.
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.
UC Diagram & Scenario RKPL C & D. Using Use Case Diagram Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior.
Requirements Document for the Banking System
1 Object-Oriented Static Modeling of the Banking System - III Lecture # 33.
1 Object-Oriented Static Modeling of the Banking System - II Lecture # 32.
1 Case Study and Use Cases for Case Study Lecture # 28.
Using Use Case Diagrams
Paul Ammann & Jeff Offutt
CMPE 280 Web UI Design and Development August 29 Class Meeting
Use Case Modeling - II Lecture # 27.
Structured Analysis and Design Technique
Storyboarding and Game Design SBG, MBG620 Full Sail University
Dynamic Modeling of Banking System Case Study - I
Use Case Model.
Object-Oriented Static Modeling of the Banking System - I
Rob Gleasure IS3320 Developing and Using Management Information Systems Lecture 8: Use Cases and Scenarios Rob Gleasure.
SE-565 Software System Requirements IV. Use Cases
Concepts, Specifications, and Diagrams
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Paul Ammann & Jeff Offutt
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Using Use Case Diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Real-Time Structured Analysis and Design Technique (RSTAD)
Presentation transcript:

Unit 3 Functional Requirements

Syllabus Introduction Features and usecases Use case Scenarios Documenting use cases Levels of details SRS Document

CMSC 345, Version 9/07 S. Mitchell Use Cases Concepts, Specifications, and Diagrams

4 CMSC 345, Version 9/07 S. Mitchell Introduction “Invented” by Ivar Jacobson in the late 1960’s (where have we seen his name before?) Introduced to the OO community in the late 1980’s Alistair Cockburn has extended Jacobson’s model Is a way to specify functional requirements Is notated using a use case specification Is not part of the Unified Modeling Language (UML), but is many times used in conjunction with it

5 CMSC 345, Version 9/07 S. Mitchell What is a Use Case? (Cockburn) A use case captures a contract between the stakeholders of a system about its behavior. Describes the system’s behavior under various conditions as the system responds to a request from one of the stakeholders called the primary actor. 1.The primary actor initiates some interaction with the system to accomplish some goal. 2.The system responds, protecting the interests of all of the stakeholders. 3.Different sequences of behaviors, or scenarios, can unfold, depending on the requests and the conditions surrounding the request. The use case gathers these scenarios together.

6 CMSC 345, Version 9/07 S. Mitchell Use Case Specification: Natural Language Example Use Case 1. Withdraw Money The system displays the account types available to be withdrawn from and the user indicates the desired type. The system asks for the amount to be withdrawn and the user specifies it. Next, the system debits the user’s account and dispenses the money. The user removes the money, the system prints a receipt, and the user removes the receipt. Then the system displays a closing message and dispenses the user’s ATM card. After the user removes his card, the system displays the welcome message.

7 CMSC 345, Version 9/07 S. Mitchell Number Name Summary Priority Preconditions Postconditions Primary Actor(s) Secondary Actor(s) Trigger Main ScenarioStepAction ExtensionsStepBranching Action Open Issues Use Case Specification Template* *Adapted from A. Cockburn, “Basic Use Case Template”

8 CMSC 345, Version 9/07 S. Mitchell NumberUnique use case number NameBrief verb-noun phrase SummaryBrief summary of use case major actions Priority1-5 (1 = lowest priority, 5 = highest priority) Preconditions Postconditions Primary Actor(s) Secondary Actor(s) Trigger Main ScenarioStepAction ExtensionsStepBranching Action Open Issues Use Case Specification Template* *Adapted from A. Cockburn, “Basic Use Case Template”

9 CMSC 345, Version 9/07 S. Mitchell Number Name Summary Priority PreconditionsWhat needs to be true before the use case “executes” PostconditionsWhat will be true after the use case successfully “executes” Primary Actor(s) Secondary Actor(s) Trigger Main ScenarioStepAction ExtensionsStepBranching Action Open Issues Use Case Specification Template* *Adapted from A. Cockburn, “Basic Use Case Template” Precondition: y != 0 Postcondition: x / y double divide(double x, double y) { return (x / y); } Precondition: None Postcondition: if y==0 “Illegal”, else x / y double divide(double x, double y) { if (y == 0) cout << “Illegal\n”; else return (x / y); }

10 CMSC 345, Version 9/07 S. Mitchell Number Name Summary Priority Preconditions Postconditions Primary Actor(s)Primary actor name(s) Secondary Actor(s)Secondary actor name(s) Trigger Main ScenarioStepAction ExtensionsStepBranching Action Open Issues Use Case Specification Template* *Adapted from A. Cockburn, “Basic Use Case Template” Actor Anyone or anything with behavior May be a person or system Primary: The stakeholder who or which initiates an interaction with the system to achieve a goal. Is generally a category of individuals (a role). Secondary: Provides a service to the system. Is almost never a person.

11 CMSC 345, Version 9/07 S. Mitchell Number Name Summary Priority Preconditions Postconditions Primary Actor(s) Secondary Actor(s) TriggerThe action that caused the use case to be invoked Main ScenarioStepAction Step #This is the “main success scenario” or “happy path” Step #Description of steps in successful use case “execution” Step #This should be in a “system-user-system, etc.” format ExtensionsStepBranching Action Open Issues Use Case Specification Template* *Adapted from A. Cockburn, “Basic Use Case Template”

12 CMSC 345, Version 9/07 S. Mitchell Number Name Summary Priority Preconditions Postconditions Primary Actor(s) Secondary Actor(s) Trigger Main ScenarioStepAction ExtensionsStepBranching Action Step #Alternative paths that the use case may take Open Issues Use Case Specification Template* *Adapted from A. Cockburn, “Basic Use Case Template” Extension Could be an optional path(s) Could be an error path(s) Denoted in use case diagrams (UML) by >

13 CMSC 345, Version 9/07 S. Mitchell Number Name Summary Priority Preconditions Postconditions Primary Actor(s) Secondary Actor(s) Trigger Main ScenarioStepAction ExtensionsStepBranching Action Open IssuesIssue #Issues regarding the use case that need resolution Use Case Specification Template* *Adapted from A. Cockburn, “Basic Use Case Template”

14 CMSC 345, Version 9/07 S. Mitchell NumberUnique use case number NameBrief noun-verb phrase SummaryBrief summary of use case major actions Priority1-5 (1 = lowest priority, 5 = highest priority) PreconditionsWhat needs to be true before use case “executes” PostconditionsWhat will be true after the use case successfully “executes” Primary Actor(s)Primary actor name(s) Secondary Actor(s)Secondary actor name(s) TriggerThe action that causes this use case to begin Main ScenarioStepAction Step #This is the “main success scenario” or “happy path.” …Description of steps in successful use case “execution” …This should be in a “system-user-system, etc.” format. ExtensionsStepBranching Action Step #Alternative paths that the use case may take Open IssuesIssue #Issues regarding the use case that need resolution Use Case Specification Template* *Adapted from A. Cockburn, “Basic Use Case Template”

15 CMSC 345, Version 9/07 S. Mitchell Number1 NameWithdraw Money SummaryUser withdraws money from one of his/her accounts Priority5 PreconditionsUser has logged into ATM PostconditionsUser has withdrawn money and received a receipt Primary Actor(s)Bank Customer Secondary Actor(s)Customer Accounts Database Use Case Specification Template Example Continued …

16 TriggerUser has chosen to withdraw money Main ScenarioStepAction 1System displays account types 2User chooses account type 3System asks for amount to withdraw 4User enters amount 5System debits user’s account and dispenses money 6User removes money 7System prints and dispenses receipt 8User removes receipt 9System displays closing message and dispenses user’s ATM card 11User removes card 10System displays welcome message ExtensionsStepBranching Action 5aSystem notifies user that account funds are insufficient 5bSystem gives current account balance 5cSystem exits option Open Issues1Should the system ask if the user wants to see the balance?

17 CMSC 345, Version 9/07 S. Mitchell Specification Writing Guidelines No trace of design Describes what the use case will do, not how it will do it (e.g., UI type is irrelevant) A dialogue between the user and the system Complete, clear, and consistent

18 CMSC 345, Version 9/07 S. Mitchell Use Case Diagrams A way of visualizing the relationships – between actors and use cases – among use cases “A graphical table of contents for the use case set” (Fowler)

19 CMSC 345, Version 9/07 S. Mitchell 1 Withdraw Money 2 Deposit Money 3 Transfer Money 4 Check Balance ATM System Bank Customer Customer Accounts Database primary actor role system name system boundary secondary actor use case <<Customer Accounts Database>> alternative actor notation stereotype association

20 CMSC 345, Version 9/07 S. Mitchell Using Use Case Specifications in Conjunction with Use Case Diagrams UML is a graphical modeling tool only. Use case specifications are not part of the UML But, since each ellipse in a UML use case diagram represents a functional requirement, it may in turn have an associated use case specification.

21 CMSC 345, Version 9/07 S. Mitchell 1 Withdraw Money 2 Deposit Money 3 Transfer Money 4 Check Balance ATM System Bank Customer Customer Accounts Database Teller 5 View Transaction History primary actor Why can’t a Teller do the things that a Bank Customer can do? Especially if he is a customer? He can. But he must “step into” the role of a Bank Customer.

22 CMSC 345, Version 9/07 S. Mitchell 1 Withdraw Money Bank Customer Customer Accounts Database 1b Withdraw from Savings 1a Withdraw from Checking > Sub-use Case Diagram This is an extend dependency. It indicates that use case 1b is part of use case 1, but it may or may not be invoked. The same is true of use case 1a. All dependencies are extend unless stereotyped otherwise. note/comment

23 Software Life Cycle Model Requirements Modeling  A requirement model is developed;  Functional requirements are expressed as: – Actors – Use case (with narrative description)  Essential: – User inputs – Active participation A throwaway prototype can be developed to clarify requirements

24 Activities in Requirements Modeling The system is considered as a black box. Emphasis is on understanding the problem. Activities: use case modeling

Banking System Case Study25 The Problem Bank Server wan ATM

Banking System Case Study26 The Problem A customer can:  Withdraw funds Withdraw funds  Query an account  Transfer funds Transfer funds  Delete a transaction in any moment so The transaction is aborted The card is ejected Customer records, account records debit card records are all mantained on the server.

Banking System Case Study27 The Problem (Trx - withdraw funds) Before approving: – Do sufficient funds exist? – Is the max limit exceedeed? – There isn’t sufficient cash in the dispenser? If approved: – Cash is dispensed; – A receipt is printed; – The card is ejected

Banking System Case Study28 The Problem (Trx - transfer funds) Before approving: – Has the customer at least two accounts? – Aren’t there sufficient funds in the account to be debited? If approved: – A receipt is printed; – The card is ejected

Banking System Case Study29 The Problem A transaction starts when:  Card is inserted  Card is recognized (assumed true)  Card validated  PIN is entered & validated The customer is allowed three attempts to enter the correct PIN; if the 3 rd attempt fails the card is confiscated.

Banking System Case Study30 The Problem A card is composed by:  A magnetic strip in which encodes: Start date; Expiration date; Serial no.

Banking System Case Study31 The Problem An ATM operator can:  Start up and close down the ATM to replenish the cash dispenser for routine maintenance

Banking System Case Study32 The Problem (what is not in) It is assumed that functionality such as open/close accounts create/update/delete customer and cards is provided by an existing system and is not part of the problem. During modeling the Bank Server should be considered as part of the problem

Banking System Case Study33 Case study development Use case modelUse case model - Req model Static modelingStatic modeling - Analysis model Object structuringObject structuring – Analysis model Dynamic modeling – Analysis model

Banking System Case Study34 Use Case Model Validate PIN Withdraw funds Val.PIN Withdraw Funds Transfer Funds Query Account ATM Customer Operator Add CashShutdownRestart > Use case diagram

25/may/2001Banking System Case Study35 Use case Model (Validate PIN Abstract use case) Use case name: Validate PIN Summary: system validates customer PIN Actor: ATM customer Pre: ATM is idle, displaying a welcome msg Description: 1. Customer inserts … 2. …… Alternatives: …… Post: Customer PIN has been validated

25/may/2001Banking System Case Study36 Use Case Model (Withdraw funds Concrete Use Case) Use case name: Withdraw funds Summary: Customer withdraws a specific amount of funds from a valid bank account Actor: ATM customer Pre: ATM is idle, displaying a welcome msg Description: 1. Include Validate PIN abstract use case 2. Customer selects withdrawal, enter amounts,… 3. … … Alternatives: …… Post: Customer funds have been withdrawn and account debited