Modelling System Behaviour: 1: Scenarios and Use cases Describing the behaviour of a system Focus Levels of Abstraction Six honest serving men The middle.

Slides:



Advertisements
Similar presentations
Introduction to Object Orientation System Analysis and Design
Advertisements

Systems Analysis and Design, 7e Kendall & Kendall
CS3773 Software Engineering Lecture 03 UML Use Cases.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Introduction To System Analysis and Design
Behaviour Modelling. Focus and Scope Large scale issues – emergence UML Use cases in requirements and design Statecharts.
Documenting Requirements using Use Case Diagrams
Requirements Elicitation Chapter 4. Establishing Requirements Two questions –What is the purpose of the system –What is inside and what is outside the.
COMP1007 Intro to Systems Requirements © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Intro to System Requirements Lecture 2 Use-Cases.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Requirements Analysis 4. 1 Use Case I b504.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis Use-Cases.
© Copyright Eliyahu Brutman Programming Techniques Course.
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
Structured Vs. Object Oriented Analysis and Design SAD Vs. OOAD
Unified Modeling Language
Object-Oriented Analysis and Design
Structured Vs. Object Oriented Analysis and Design SAD Vs. OOAD
Chapter 7: The Object-Oriented Approach to Requirements
USE Case Model.
Continuation From Chapter From Chapter 1
Modelling information systems
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
These slides are designed to accompany Web Engineering: A Practitioner’s Approach (The McGraw-Hill Companies, Inc.) by Roger Pressman and David Lowe, copyright.
Business Modeling : basic concepts Extracted from Rational UML Profile for business modeling.mht.
Introduction to Sequence Diagrams
Use Cases Ivar Jacobson - guru at Rational Corp., defined UML.
Interaction Modeling. Introduction (1) Third leg of the modeling tripod. It describes interaction within a system. The class model describes the objects.
Chapter 10 Information Systems Analysis and Design
10/12/ Recall The Team Skills 1. Analyzing the Problem (with 5 steps) 2. Understanding User and Stakeholder Needs 1. Interviews & questionnaires.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Chapter 9 요구사항 모델링: 시나리오 기반 방법론 Requirements Modeling: Scenario-Based Methods 임현승 강원대학교 Revised from the slides by Roger S. Pressman and Bruce R. Maxim.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 Object-oriented and Structured System Models.
 A software application is like a city  Modeling = Architecture  OOP = Civil Engineering  UML Classes = Blueprints of Buildings  UML is a common.
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.
1 Introduction to Software Engineering Lecture 1.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
1 Structuring Systems Requirements Use Case Description and Diagrams.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
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.
Unified Modeling Language User Guide Section 4 - Basic Behavioral Modeling Chapter 16 - Use Cases Chapter 17 - Use Case Diagrams.
By Germaine Cheung Hong Kong Computer Institute
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
New Perspective Based on how the system is used. What Is a Use Case? A case of how the system is used. –A behaviourally related sequence of interactions.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
UML (Unified Modeling Language)
Chapter 5 System Modeling (1/2) Yonsei University 2 nd Semester, 2015 Sanghyun Park.
USE CASE Pertemuan 7 Matakuliah: Konsep object-oriented Tahun: 2009.
UML - Development Process 1 Software Development Process Using UML.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
L16 Scenarios and Use cases. Topics Scenarios Use cases Sequence diagrams Use cases in analysis Tutorial work.
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.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
Chapter 4 – System Modeling Lecture 1 1Chapter 5 System modeling.
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
Chapter 5 – System Modeling
Welcome to M301 P2 Software Systems & their Development
Object-oriented and Structured System Models
Chapter 5 System modeling
Chapter 5 – System Modeling
UML Use Case Diagrams.
System Modeling Chapter 4
Object Oriented Analysis and Design
Analysis models and design models
Software Design Lecture : 15.
Interaction Modeling Extracted from textbook:
Chapter 4 System Modeling.
Presentation transcript:

Modelling System Behaviour: 1: Scenarios and Use cases Describing the behaviour of a system Focus Levels of Abstraction Six honest serving men The middle ground – Scenarios and use cases

Focus: example A rescue organisation such as the RAC Individual –What happens to a member as they progress from registration, renewal, breakdowns through to death or cancellation – a whole life view Group –How the member, the call-centre operator and the mechanic collaborate to assist in a breakdown Society –How to predict demand for resources such call-centre operators, mechanics and server power under varying conditions of weather and other circumstances

Three focus settings Focus on an individual and what happens to it over the whole life time –Entity Life History, State Chart Focus on a small group of interacting individuals over the period of an ‘incident’ –Scenarios, Use cases, Interaction Diagrams, Activity Diagrams, RAD (Role Activity Diagram) Focus on the massed behaviour of the society –Data flow?, System Dynamics, Simulation models

Levels of abstraction Conceptual data models describe structures – mapped into RDBMS or XML We distinguish at least 3 levels of abstraction in data structuring: –The user’s view - a Database virtual view or the output of an XSLT transformation –The conceptual model – the logical structure expressed in an ER model –The logical model specific to a kind of data model - XML, RDBMS, Object Oriented –The physical files required to support a datamodel As far as possible, we want to bridge these levels automatically e.g. –QSEE transforms a conceptual model into a RDBMS schema, with some designer guidance (which database..) –XSLT engine guided by a style sheet generates a user view from the logical model –An SQL view defines a mapping from an RDBMS schema to a users schema

Three levels of abstraction in describing behaviour User Logical –Business Process Modelling, Rule-based models Physical –Web service, data flow in a batch system, programs

“I keep six honest serving men (They taught me all I knew): Their names are What and Why and When And How and Where and Who” How the system is intended to work –prescriptive How the system does work –Descriptive Why the system works this way –The design rationale What is the system trying to achieve –The goals

six honest serving men What - Subject – what is being modelled –What domain of the total system –What aspect of a system Why - Purpose - why are we modelling –Communication – external –Analysis - internal How – – what format - physical, diagrammatic, textual, mathematical.. When – at what stage of the lifecycle –Requirements –Analysis –Design –Maintenance Who – – makes the model – uses the model – controls the notation? Where – –Back of a fag packet –Powerpoint presentation –On a central computer database?

Background to UML UML (Unified Modelling Language) has emerged as the dominant set of graphical notations for use in Object- oriented Software Development Current version is UML 2.0 with 14 different diagram types UML is unavoidable - widely used and written about UML is enthusiastically being extended into non-software domains : business processes and systems engineering (SysML) Whilst UML is just a set of notations, it is linked to a software development approach (life-cycle) called RUP (Rational Unified Approach) which is also being extended into other areas (RUP SE) There are dissenting voices.

UML Notations Use case Diagram –Showing the actors involved in a use case Interaction Diagram –Showing the sequence of steps in the interaction between actors and the system Activity Diagram –Showing how data flows from one process to another Class Diagram –Showing the classes in the system State Chart –Showing how an object changes over time as a result of events + others

Use-cases and scenarios Classification –Focus – small group –Level of abstraction – conceptual –Prescriptive/graphical-textual/early analysis Use cases include the actions of users as part of that interaction –Use cases set requirements into context of use –Use cases also point to ‘requirements’ on users for using the system – systems knowledge, training, level of education…

situation GetUHome’ is a company which provides a breakdown service to its members nationwide. Members pay a yearly subscription to the company. In the event of a breakdown, the distressed motorist phones the call centre where an available operator takes the call. The operator checks that the caller is a paid-up member. If he is, the operator obtains details of the motorist’s problems and location. He then finds the most appropriate mechanic to deal with the problem and calls the mechanic with the new task. The mechanic proceeds to the location of the motorist while the operator reports the expected arrival time to the motorist.

Scope What is the scope of ‘the system’ –The Rescue organization The operator and mechanic are inside this system boundary –The Computer System The operator and mechanic are outside this system boundary Under different circumstances either may be appropriate but the boundary must be defined Examples –The following example use case is at the organizational level –Latter these would be refined to computer system use cases

General to Specific A generalised use-case: –Is described in terms of roles: 'an operator’ –Covers a number of possible paths. –Danger that the reader will import their own stereotype – white, male, English first language A specific, concrete scenario or ‘story’: –Is described in terms of specific instances: 'Paul the operator, a 2nd Year business studies student from London who works part time at GetUHome to finance his studies and clubbing'. –The story describes exactly what happened, not several possible outcomes. Stories favour insight into the problem situation and may reveal unanticipated assumptions about the situation and the nature of the actors. Use cases provide grounds for formal requirements for the system but also informal requirements for the knowledge and capabilities of the actors

Use case Uses a template to structure the information Is named for the goal of the principal actor: –Name: Get help –Primary Actor: Motorist Describes normal use case (‘good day’) and alternative situations arising from ‘normal’ variations Supported by a Use-case diagram showing one or more use cases May be elaborated into an interaction diagram

Use Case Diagram Get help MotoristOperator Mechanic

Additions Symbols –Different symbols in the diagram for different types of actors Use case matrix –Diagram is unworkable for large numbers of use cases - matrix of use cases by actor (perhaps indicating the role) is more informative Relations between Use cases : Extends and Uses –Uses – a smaller unit of functionality which is used by several larger units – e.g. check member info –Extends – variations to use cases require additional behaviour in special cases – these ‘extend’ the original use case

Sequence diagram MotoristOperatorMechanic Call for help Request member info Member info Check member Request location & problem Location and problem Request OK and ETA OK and ETA ETA Vehicle proceeds to location Select appropriate vehicle

Use cases in problem analysis Information Requirements · What information is required to identify a member? · What information is required to identify the problem and location? · How do we choose the most appropriate vehicle to send? · Who provides the ETA? The operator, the rescue driver or both in consultation? How is it calculated? Variations · What happens if the membership has expired? · What happens if the motorist can’t remember his id? · What if the motorist has ‘borrowed’ someone else’s id? · What if the motorist doesn’t know where they are? · How does the rescue driver find the motorist? Performance · What is an acceptable time to wait for an operator? · What is an acceptable time to wait for a rescue vehicle

Mis-use and abuse cases Identify –Treats and attacks Attempt to acquire customer list –Deliberate misuse by humans Use of a stolen membership card –System failure Loss of telephone lines Loss of communication channel to mechanic

Use-cases and Design Concrete Scenarios –Write a concrete scenario for each use case to flesh it out Brain storming –One group identify problems with scenario –Other group suggest solutions Role playing –Testing out a proposed solution using role playing

Use cases in.. Testing –Use cases generate test situations –Tests can be written in advance for use in test-driven development Training –Use cases are the scenarios in which users will need to be educated or trained to use the system

Dissenting Voices Uncertainly about what a use case is, how big, how general, what boundary, when to stop finding use cases. A project may have many hundreds of use case so computer support necessary to manage and to restructure ( find all for an actor…), trace requirement to use cases. Relationship between use-case and requirements is many-many so mapping requires additional work and traceability. Uses case may be poor at surfacing so-called ‘non- functional requirements’. Scope of use-case is too narrow – often at the level of an interaction over a small period of time – what about the long-running processes with the scope of the whole period of membership? Focus is on system boundary, not directly on the problem domain.

Problem Domain Modeling Nature of problem domain is only tacitly reflected in the development process –“An airplane overshot the runway when attempting to land. The runway was wet, and the plane's wheels were aquaplaning instead of turning. The plane's guidance system thought, in effect, "I'm on the ground, but my wheels aren't turning. So I must not be moving," and would not allow the pilot to engage reverse thrust. Aquaplaning, a very relevant property of the real world, was not considered by the developers when they created the guidance system. The consequence is a plane in a ditch past the end of the runway, instead of safely docked in the terminal.”

Language in the Problem Domain Terminology of the problem domain is used without analysis in use cases –In a railway system, the word ‘train’ has multiple meanings for different groups: –“To some of them, a "train" was a particular collection of rolling stock (a locomotive and all the cars it pulled). To others, a "train" was just the locomotive. To others, a "train" was a regularly scheduled run, as in "I'll catch the 6 o'clock train to Boston". To others, a "train" was a specific instance of a regularly scheduled run, so that the train that left for Boston today at 6 o'clock, and the train that left for Boston yesterday at the same time, are two different trains.”