1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 6 - Use cases and activity diagrams Dr.

Slides:



Advertisements
Similar presentations
Design by Contract.
Advertisements

Withdrawal Transaction Use Case Primary Actor: Customer Pre-conditions: The customer must have a valid ATM card and PIN. Post-conditions: The customer.
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 3 - Software Systems and Requirements.
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 7 – More on use cases and activity diagrams.
9/10/2004Use Case Workshop 1 CSC480 Software Engineering Workshop 1 Requirements Modeling.
Extending the Requirements Model - techniques for detailing use cases
CS3773 Software Engineering Lecture 03 UML Use Cases.
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.
Interaction Diagrams Activity Diagram State Machine Diagram
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Use-case Modeling.
Documenting Requirements using Use Case Diagrams
1 CS 425 Software Engineering Project Preparation Use Case Modeling [Based on Chapters 3 & 4, Arlow and Neustadt, “UML and the Unified Process,” Addison-Wesley,
7M822 UML Activity Diagrams 6 October 2008.
Requirements Analysis Activity Diagrams b511.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis.
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Introduction to Requirements Analysis Lecture.
Chapter 10: Architectural Design
Use Case Diagram.
Unified Modeling Language
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 4 - System modelling Dr Richard Clayton.
Software Engineering – University of Tampere, CS DepartmentJyrki Nummenmaa USE CASES In this lecture: Use cases - What are use.
CS 325: Software Engineering March 3, 2015 Activity Modeling for Transformational Systems Trtansformational Systems UML Activity Diagrams.
Chapter 8: Modelling Interactions and Behaviour UML Activity Diagram
Software Waterfall Life Cycle Requirements Construction Design Testing Delivery and Installation Operations and Maintenance Concept Exploration Prototype.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 21. Review ANALYSIS PHASE (OBJECT ORIENTED DESIGN) Functional Modeling – Use case Diagram Description.
CS 360 Lecture 6.  A model is a simplification of reality  We build models to better understand the system being developed.  We build models of complex.
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 10 – Classes and operations Dr Richard.
10/12/ Recall The Team Skills 1. Analyzing the Problem (with 5 steps) 2. Understanding User and Stakeholder Needs 1. Interviews & questionnaires.
Chapter 4 – Requirements Engineering Lecture 3 1Chapter 4 Requirements engineering.
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.
Requirements Capture. Four Steps of requirements capture List candidate requirements Understand system context Capture functional requirements Capture.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
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.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
1 Capturing Requirements As Use Cases To be discussed –Artifacts created in the requirements workflow –Workers participating in the requirements workflow.
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.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
Chapter 3: Introducing the UML
Session 5 Object Model Development. OOAD with UML / Session 5 / 2 of 19 Review A class icon is a rectangle with three sections within it An object is.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
Software Engineering: Models David Millard
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.
UML Activity and Sequence Diagrams David Millard
1 Advanced DataBases Unified Modelling Language An Introduction and Use Case Lecture 2 Susan Curtis.
1 Team Skill 3 Defining the System Part 1: Use Case Modeling Noureddine Abbadeni Al-Ain University of Science and Technology College of Engineering and.
Systems Analysis and Design in a Changing World, Fourth Edition
Business Process and Functional Modeling
Chapter 4: Business Process and Functional Modeling, continued
CMPE 280 Web UI Design and Development August 29 Class Meeting
Use Case Modeling - II Lecture # 27.
Recall The Team Skills Analyzing the Problem (with 5 steps)
Unified Modeling Language
Object-Oriented Static Modeling of the Banking System - I
Chapter 8: Modelling Interactions and Behaviour UML Activity Diagram
Use Case Modeling - techniques for detailing use cases
Object Oriented Analysis and Design
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
CS 420/620 HCI Use Case Modeling Project Preparation
CS 425 Software Engineering
CS 425/625 Software Engineering
Presentation transcript:

1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 6 - 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  Use case model  ATM system specification  Activity diagrams  Workflow description using activity diagrams Reading: Bennett chapter 6; Stevens chapters 7, 11

3COM6030 Systems Analysis and Design © University of Sheffield 2005 First part of the course Use case model A user-oriented approach on systems analysis.  Identify the users of the system and the tasks they must undertake.  UML uses technical terms actors and use cases.  Actor = a user of the system in a particular role (an actor might be an external system as well); a customer in the ATM system is an actor.  Use case = is a task which an actor needs to perform with the help of the system; withdraw cash from ATM is a use case; use case may describe a simple or a fairly complex behaviour.

4COM6030 Systems Analysis and Design © University of Sheffield 2005 Use cases Use cases were first proposed by Jacobson (1992) for capturing requirements:  identify single user interactions with a system;  identify stakeholder interactions with a business;  not a good formalism for expressing control logic. Idea is to elicit required system functionality. No prior knowledge of system assumed:  interview the client, taking notes;  collect use cases (i.e. scenarios, examples of usage);  concentrate initially on normal flow of events;  later, look for alternative or exceptional flows;  structure the model afterwards.

5COM6030 Systems Analysis and Design © University of Sheffield 2005 Use cases  A use case is: "a single complete interaction of a user with a system that delivers a result of observable value"  i.e. the smallest-level business task that has meaning and delivers something of value for the user.  Limits:  single complete interaction - accomplishes a single objective, not multiple (upper bound);  result of observable value - accomplishes a business function, not a code instruction (lower bound).  Positive examples:  Deliver goods, Pay Invoice, Process order.  Negative examples:  Enter password, Increase productivity, Quit menu.

6COM6030 Systems Analysis and Design © University of Sheffield 2005 Natural language representations  There is deliberately no specified format. Natural language representations can be:  informally structured descriptions  pseudocode with pre, post-conditions  Aim to use consistent style if at all possible.  Adopt format that is appropriate for type of scenario in business system, may be terse or verbose.  Remember  inherent ambiguity in natural language, use cases should be reviewed critically with client;  use cases are a description of interactions from the user’s perspective.

7COM6030 Systems Analysis and Design © University of Sheffield 2005 ATM example – natural language Name:Insert card and v alidate PIN Type: Functional Description: Inserts the card; v alidates 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. Inputs: PIN, bank system record. Outputs: PIN correct, PIN incorrect. Criticality: Validation of PIN is a key component of ATM function. Risk: Very high. Dependencies: User input, communication with bank system.

8COM6030 Systems Analysis and Design © University of Sheffield 2005 Use cases – a summary  Use cases describe who (actor) does what (interaction) with the System, for what purpose (goal).  A complete set of use cases  Specifies all the different ways to use the system  Defines all the behaviour required of the system  Use cases are used to construct use case diagrams. These are a formal description, defined as part of the UML.

9COM6030 Systems Analysis and Design © University of Sheffield 2005 UML use case diagram syntax Cash withdraw from ATM > Actor – participant in use case; usually a user of the system, may not be a human. An individual use case. Communication association. Generalisation relationship. Dependency relationship. A stereotyped model element. System or subsystem boundary.

10COM6030 Systems Analysis and Design © University of Sheffield 2005 Actors Actors are a fundamental component of Use Case diagrams  An actor interacts with a system to produce an observable result.  Actors are often users of a system.  Names correspond to role of actor in use case.  Actors may not necessarily be human.  A generalisation relationship may exist between actors. X is a generalisation of Y if Y-is-a-X. Buyer Seller Broker Three actors in an estate agency Actor Academic University employee University employee is a generalisation of academics. All academics are university employees, but not all university employees are academics.

11COM6030 Systems Analysis and Design © University of Sheffield 2005 Use cases Insert card & validate PIN Manage PIN Withdraw cash Get balance ATM system System Actor - human Actor – another system Customer Bank One can distinguish a Card Manager actor Use case

12COM6030 Systems Analysis and Design © University of Sheffield 2005 Use cases – using generalisations Insert card & validate PIN Manage PIN Withdraw cash Get balance ATM system CustomerBank Transaction

13COM6030 Systems Analysis and Design © University of Sheffield 2005 Generalisations  A generalisation relationship may exist between use cases as well as actors.  X is a generalisation of Y if Y-is-a-X.  Direction of generalisation is from specific to general.  For ATM system … Transaction Get balance Bank Card manager

14COM6030 Systems Analysis and Design © University of Sheffield 2005 Requirements review 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… CustomerAny card holder accessing an ATM. BankThe bank system that manages customers’ accounts. Card Manager The bank system that manages accounts and cards.  The system is specified as a set of subsystems (only one for ATM system).  Each subsystem consists of  a list of actors and their roles;  a list of use case descriptions;  associated use case diagrams;  activity diagrams (next slides) – optional. Use case descriptions Actor descriptions

15COM6030 Systems Analysis and Design © University of Sheffield 2005 Use cases for requirements capture  Use cases can help with requirements capture by providing a structured way to deal with it:  Identify the actors.  For each actor find out: what they need from the system – their associated use cases; other interactions – which use cases they might take part in for someone else’s benefit.  Possible problems with use cases:  Build a system in a non-object oriented manner (functional approach).  Danger of thinking too operationally; users describe the use cases as a sequence of interactions in a given order, maybe not the right one – leads into design.  Danger of missing requirements by focusing too much on finding actors and their uses cases; can be lessened by doing use case analysis and conceptual class modelling in parallel.

16COM6030 Systems Analysis and Design © University of Sheffield 2005 Activity diagrams 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 ……

17COM6030 Systems Analysis and Design © University of Sheffield 2005 Elements of activity diagrams Validate PIN An activity – a sort of state which is left when the activity it represents is finished. A transition – a non-labelled arrow; it might have a guard. A synchronisation bar – expresses either waiting for all subtasks to finish before proceeding (join) or starting several subtasks in parallel (fork). A decision diamond – a non-labelled arrow; it might have a guard. A start marker – points to the initial activity. A stop marker – indicates the end task.

18COM6030 Systems Analysis and Design © University of Sheffield 2005 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. Insert cardValidate PIN TransactionReceive card [incorrect PIN] [correct PIN] Activity diagrams - example It also shows that a transaction is executed after the PIN is validated against the central record.

19COM6030 Systems Analysis and Design © University of Sheffield 2005 When activity diagrams contain several groups of related activities (belong to the same objects, use cases etc) they can be split into partitions known as swimlanes. ATM – Insert card & validate PIN: Insert cardValidate PIN TransactionReceive card [incorrect PIN] [correct PIN] Partitions and swimlanes CustomerATM system

20COM6030 Systems Analysis and Design © University of Sheffield 2005 Summary  Two key UML diagrams for requirements analysis: use cases and activity diagrams.  Requirements specification using use case diagrams and natural language description.  Activity diagrams to specify formally a use case description and to show interdependences among use cases.