1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 7 – More on use cases and activity diagrams.

Slides:



Advertisements
Similar presentations
Chapter 4: Requirements Engineering
Advertisements

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
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 3 - Software Systems and Requirements.
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.
Extending the Requirements Model - techniques for detailing 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
Requirements and Design
Information System Design IT60105 Lecture 3 System Requirement Specification.
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.
1 Classes. 2 Finding classes w Choosing classes is first step in defining essence of problem w If you can recognize an abstraction, you’ve found a candidate.
Chapter 12 ATM Case Study, Part 1: Object-Oriented Design with the UML
ATM User Interface Design. Requirements A bank customer is able to access his or her account using an automatic teller machine. To be able to use an ATM.
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
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
Object Oriented Analysis Process
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 6 - Use cases and activity diagrams Dr.
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) 
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 4 - System modelling Dr Richard Clayton.
Use Cases 2 ENGR ♯10 Peter Andreae
Software Waterfall Life Cycle Requirements Construction Design Testing Delivery and Installation Operations and Maintenance Concept Exploration Prototype.
ECE 264 Object-Oriented Software Development Instructor: Dr. Honggang Wang Fall 2012 Lecture 3: Requirements Specification, C++ Basics.
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 10 – Classes and operations Dr Richard.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 25. Review Design Level Class Diagram Identifying classes/Operations/Attributes Associations – Simple associations.
1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of.
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
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 9 – More on objects and classes Dr Richard.
Faculty of Computer & Information
Behavioral Modeling: Sequence and Communication Diagrams Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan.
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
Week IV in SOS  Tuesday Project Time -- 4:15pm-5pm URL for project(s) due to Judy by Friday 5pm  Friday Paper  OOAD Handouts thru last Thursday (see.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Week 10 1 Sequence Diagrams. Outline a)Add scenarios to the system to describe how Use Cases are realized as interactions among societies of objects b)Describe.
Learning Intentions Explain what an ATM is and the facilities offered Identify the stages of withdrawing cash from an ATM List the advantages and disadvantages.
UML (Unified Modeling Language)
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.
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.
1 Object-Oriented Static Modeling of the Banking System - III Lecture # 33.
1 Case Study and Use Cases for Case Study Lecture # 28.
Auburn University COMP 2710 Software Construction Use Case Analysis – Examples and Exercises Dr. Xiao Qin Auburn University.
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
ATM OO Design and Implementation Case Study
Storyboarding and Game Design SBG, MBG620 Full Sail University
Dynamic Modeling of Banking System Case Study - I
Object-Oriented Static Modeling of the Banking System - I
Exercices & Corrections Week 3
Chapter 8: Modelling Interactions and Behaviour UML Activity Diagram
Use Case Modeling - techniques for detailing use cases
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
Chapter 5 Architectural Design.
Real-Time Structured Analysis and Design Technique (RSTAD)
Presentation transcript:

1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 7 – More on use cases and activity diagrams Dr Richard Clayton & Dr Marian Gheorghe Module (1 st part) homepage

2COM6030 Systems Analysis and Design © University of Sheffield 2005 Outline  More on use case diagrams  > and > relationships  ATM system specification revisited  Activity diagrams modelling more complex processes Reading: Bennett chapter 6; Stevens chapters 7, 11

3COM6030 Systems Analysis and Design © University of Sheffield 2005 ATM system - use cases Insert card & validate PIN Manage PIN Withdraw cash Get balance ATM system Customer Bank Remember…

4COM6030 Systems Analysis and Design © University of Sheffield 2005 Identifying and documenting actors and use cases  Use cases can help with requirements capture by providing a structured way to identify:  actors  associated use cases. CustomerAny card holder accessing an ATM. BankThe bank system that manages customers’ accounts. Card Manager The bank system that manages accounts and cards. Insert card &validate PIN Inserts card; validates the PIN entered by the user against the central record held on the bank system. Returns an output indicating that the PIN is either correct or incorrect. If the PIN is correct then the session can continue. If the PIN is not correct then the session will terminate, and the card should be returned to the user. Manage PIN.. Get balance… Withdraw cash… Use case descriptions Actor descriptions

5COM6030 Systems Analysis and Design © University of Sheffield 2005 More about ATM transactions  Manage PIN, Get balance, Withdraw cash are presented below… Insert card &validate PIN Inserts card; validates the PIN entered by the user against the central record held on the bank system. Returns an output indicating that the PIN is either correct or incorrect. If the PIN is correct then the session can continue. If the PIN is not correct then the session will terminate, and the card should be returned to the user. Manage PINIt allows changing the four digit PIN with a new value. Get balanceIt displays/prints out the current balance of the bank account. Withdraw cashThe customer chooses an amount to be withdrawn either from a list or enters a free choice amount. It is checked that the requested amount is less than the current balance of the associated bank account – including the overdraft limit; it is also checked that the requested amount is under the amount that can be withdrawn from the card per day; lastly it is checked that the requested amount is available in the ATM dispenser. When all these conditions are true then the bank account, the card day limit and the dispenser amount are updated, the card is released and the cash is dispensed; if one of these conditions is false then the customer will be prompted to consider another option.

6COM6030 Systems Analysis and Design © University of Sheffield 2005 First part of the course > relationship between use cases > is represented as X use case Y use case > It shows that X use case uses Y use case When some functionality (behaviour) is used more than once in a system specification then it is worth factorising it out as a separate component – this will be used by various use cases; the set of use cases is revisited. Find address Send invoice Deliver goods This approach is usually part of a second iteration of requirements analysis stage when use case diagrams are employed. >

7COM6030 Systems Analysis and Design © University of Sheffield 2005 ATM – use cases with > In the ATM system Insert card & validate PIN identifies both the PIN and the bank account that are used by other use cases.  Identify Provide PIN and Provide bank account as common behaviour to other use cases.  Use Provide PIN and Provide bank account as new factorisations in the current system.  The natural language description as well as use case descriptions need to be reconsidered. Provide PINIt provides the PIN captured by Insert card & validate PIN or the one modified by manage PIN. Provide bank account It provides the bank account identified when the PIN is validated.

8COM6030 Systems Analysis and Design © University of Sheffield 2005 ATM system with > Insert card & validate PIN Manage PIN Withdraw cash Get balance ATM system Customer Bank Provide PIN Provide bank account >

9COM6030 Systems Analysis and Design © University of Sheffield 2005 ATM new use cases Insert card &validate PIN Inserts card; validates the PIN entered by the user against the central record held on the bank system. Returns an output indicating that the PIN is either correct or incorrect. If the PIN is correct then the session can continue. If the PIN is not correct then the session will terminate, and the card should be returned to the user; PIN number and bank account will be recorded. Manage PINIt allows changing the four digit PIN with a new value; updated PIN recorded. Get balanceIt displays/prints out the current balance of the bank account using the PIN number and bank account provided. Withdraw cashThe customer chooses an amount to be withdrawn either from a list or enters a free choice amount. It is checked that the requested amount is less than the current balance of the associated bank account – including the overdraft limit; it is also checked that the requested amount is under the amount that can be withdrawn from the card per day; lastly it is checked that the requested amount is available in the ATM dispenser. When all these conditions are true then the bank account, the card day limit and the dispenser amount are updated, the card is released and the cash is dispensed; if one of these conditions is false then the customer will be prompted to consider another option; PIN number and bank account provided are used. Provide PIN … Provide bank account …

10COM6030 Systems Analysis and Design © University of Sheffield 2005 > relationship  When a use case incorporates two or more different scenarios then these may be represented as different use cases: a main use case and some subsidiary cases.  Use the > arrow from the less central (exceptional case) to the main case.  Used when variants different from the main behaviour are identified. Deliver goods Print invoice Print unavailable goods > -- Exceptional case -- Optional situation

11COM6030 Systems Analysis and Design © University of Sheffield 2005 ATM system with > Insert card & validate PIN Manage PIN Withdraw cash Get balance ATM system Customer Bank Refuse withdraw insuff cash Refuse withdraw insuff day limit Refuse withdraw insuff balance >

12COM6030 Systems Analysis and Design © University of Sheffield 2005 Summary on >, >  > relationship is considered to  show how the system can use a pre-existing component;  show common functionality between use cases;  document a new reusable component developed by the current project.  > relationship shows  an optional case that is different from the main use case;  an exceptional case that is considered by the main use case.  > and > define new relationships among use case.  Are addressed by the next iteration stages.  Use case descriptions are updated in each iteration stage.

13COM6030 Systems Analysis and Design © University of Sheffield 2005 Activity diagrams (recap) Activity diagrams are useful to  describe an overall workflow of an area of the customer’s activities;  specify how individual use cases unfold and may depend on other use cases (all transactions of an ATM follow PIN validation);  represent how an operation (see object specifications) could be implemented. The fundamental block is an activity; a transition out of an activity normally means that the activity has been completed. Insert cardValidate PIN …… More complex use cases and parallel behaviour will be addressed on the next slides.

14COM6030 Systems Analysis and Design © University of Sheffield 2005 Cash withdrawal – complex scenario Select amount Check customer’s card day limit Check customer’s balance Check dispenser Return cardRelease cash [amount>balance] [amount<=balance] [amount>day limit] [amount<=day limit] [amount>available cash] [amount<=available cash]

15COM6030 Systems Analysis and Design © University of Sheffield 2005 Activity diagrams – relating use cases [withdraw cash] [don’t withdraw cash] [get balance] [don’t get balance] [PIN operation] [no PIN operation] [exit][no exit] Insert card & validate PIN Choose from menu Withdraw cash Display balance Manage PIN Display errorReturn card

16COM6030 Systems Analysis and Design © University of Sheffield 2005 Activity diagrams – business process  Activity diagrams may describe some more general business processes.  Some processes may run either in parallel or in an arbitrary order – it requires the use of the synchronisation bar and join/fork primitives.

17COM6030 Systems Analysis and Design © University of Sheffield 2005 ATM – business process Wait in queue Remember PINInsert card Type in & validate PIN Perform transaction Return card The order of these activities is not important

18COM6030 Systems Analysis and Design © University of Sheffield 2005 Business process & swimlanes Library memberLibrary assistant Wait in queue Identify book(s) Go to library desk StampRecord Give book(s) to library member

19COM6030 Systems Analysis and Design © University of Sheffield 2005 Summary  Use case diagrams capture iteratively requirements stages.  Systems, subsystems, actors and basic case studies – first iteration.  Functionality common to several use cases and unusual cases is captured via > and > in later iterations.  Relationships between use cases, complex behaviour, control mechanisms, parallel processing are expressed through activity diagrams.