2.4. Use Case Modeling In O-O based IT projects, we can begin the requirements analysis phase with a Use Case Analysis A use case is a common or representative.

Slides:



Advertisements
Similar presentations
Design by Contract.
Advertisements

Object-Oriented Software Engineering Visual OO Analysis and Design
System Sequence Diagrams
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Software Development 2D Karl Meinke CSC KTH
Software Development 2D1385 Karl Meinke NADA KTH
Object-Oriented Analysis and Design
Introduction To System Analysis and Design
Drawing System Sequence Diagrams
Chapter 18 Object-Oriented Systems Analysis and Design Using UML
Systems Analysis and Design in a Changing World, Fourth Edition
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Use Case Modeling.
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
7M822 UML Interaction Diagrams 25 November 2010.
Use Case Analysis – continued
2.0. Requirements Capture and Analysis with UML The Unified Modeling Language 2.0 ( Class/Object diagrams (static) Sequence diagrams (dynamic)
Introductory case study. 2 The problem The most difficult part of any design project is understanding the task you are attempting You have been contacted.
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
Chapter 3 : Software Process and Other Models Juthawut Chantharamalee Curriculum of Computer Science Faculty of Science and Technology, Suan Dusit University.
Software Engineering Case Study Slide 1 Introductory case study.
The chapter will address the following questions:
CMPT 275 Software Engineering
IT323 - Software Engineering 2 Tutorial 1. 0 The system 1.0 A Function 1.1 Activity of the function Task Task Task 1.2 Another activity.
Class, Sequence and UML Model.  Has actors and use cases.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
程建群 博士(Dr. Jason Cheng) 年03月
Introduction to Sequence Diagrams
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!)
 A software application is like a city  Modeling = Architecture  OOP = Civil Engineering  UML Classes = Blueprints of Buildings  UML is a common.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
UML-1 3. Capturing Requirements and Use Case Model.
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Engineering Lab Use Cases Faculty of Information system Technology.
Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence.
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.
Drawing System Sequence Diagrams
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.
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.
Chapter 7 The Object-Oriented Approach to Requirements.
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
Modelling Class T07 Conceptual Modelling – Behaviour References: –Conceptual Modeling of Information Systems (Chapters 11, 12, 13 and 14)
CSCI-383 Object-Oriented Programming & Design Lecture 12.
ITEC324 Principle of CS III Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Systems Analysis and Design in a Changing World, Fourth Edition
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.
Analysis Classes. What Is an Analysis Class?  A class that represents initial data and behavior requirements, and whose software and hardware-oriented.
1 Using Rational Rose ® to construct UML diagrams.
McGraw-Hill/Irwin© 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 17 Object-Oriented Design and Modeling Using the UML.
High Level Design Use Case Textual Analysis SE-2030 Dr. Mark L. Hornick 1.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
More on UML 1. 1.Use-case diagram 2.Class diagram [Object diagram] (static) 1.1 Domain/analysis model – of reality 1.2 Design model – of decisions 3.
Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Chapter 3: Software Design –Use case Diagram Nouf Alghanmi.
Analysis Classes Unit 5.
UML Diagrams: Sequence Diagrams Dynamic Analysis Model
Object-Oriented Software Engineering
ITEC324 Principle of CS III
Presentation transcript:

2.4. Use Case Modeling In O-O based IT projects, we can begin the requirements analysis phase with a Use Case Analysis A use case is a common or representative situation where one or more external users and/or systems interact with the system to solve an instance of a common problem 1

Notice the underlined word “common” Software seems to obey the statistical Pareto Law 90% of time is spent executing just 10% of the code Therefore care in designing just this 10% of code is “cheap” and will give a good product 90% of the time (at least in theory!) 2

Note: we want to decouple specific users (e.g. John Smith) From their roles, e.g. student, teacher, systems administrator, etc. A role will be called an actor. A specific proper noun (object) e.g. Karl Meinke, may play several roles: teacher, researcher, sys_admin... etc. 3

Central O-O Dogma Common Nouns e.g. warehouse, truck, correspond to classes and attributes Proper Nouns e.g. Karl, Fido, KTH, correspond to objects Verbs e.g. unload, correspond to methods Relational Phrases e.g. responsible for, correspond with system structure 4

Not every noun will be an actor … … but every actor will be a noun, so: Actors  Nouns 5

Step 2 requires us to look at each actor in turn and ask: What does this actor want to do (all verbs)? What does the actor need from the system to accomplish each activity (each verb)? Let’s look at a logistics system with an actor “foreman” and try to identify goals … 6

(a) A foreman has to be able to move items between warehouses with or without a customer order. This use case scenario is called “manual redistribution between warehouses” (b) A foreman also wants to check how far a customer order has been processed. We call this use case scenario “check status of a customer order”. 7

Let’s try to informally define the 1 st use case scenario: “manual redistribution between warehouses”. This could be broken down into 4 steps (1)Initialisation: when a foreman gives a request to do a redistribution. 8

(2) Planning: when the system plans how to co-ordinate the various transports, and issues transport requests (3) Loading: when a truck fetches the items from a source warehouse. (4) Unloading: when a truck delivers items to a destination warehouse. 9

Is there anything wrong with this use case? (1)It is very short! - but we can add detail later! (2)It doesn’t say what happens if things go wrong. - We need to add exception/error cases. - The more of these we add, the more robust our system will be. 10

2.6. UML Sequence Diagrams A use case scenario describes a sequence of interactions or messages between a collection of actors and the system in order to carry out some task 11

Often we would like to formally model a use case scenario, to study: timing aspects (relative or absolute) communication patterns system states exception behavior alternative paths or behaviors 12

Elementary Concepts A basic sequence diagram depicts a set of objects or processes each of which has its own timeline. Conventionally, objects go across the diagram horizontally, while time goes down the diagram vertically. Down the timelines, between objects, we show messages. 13

C : ComputerP : Print_serverD : Device >lpr file print(file, device) print(file,size) done >done (time) Here’s a sequence diagram with the basic elements: object/process timeline message time SD Print 14

Notice that: This basic SD has 3 objects and 6 messages 1 message comes from the environment: >lpr file (from the keyboard??) 1 message goes to the environment >done(time) (to the screen??) The environment is an implicit actor Each timeline has a terminating block at the bottom, which does not mean that the object dissappears/ gets deleted, life goes on!! 15

Events in Time An SD must show dynamic behavior over time as possible (permissible) sequences of events Down each timeline we see a set of local events A basic event may either be: sending of a message (arrow tail) receiving of a message (arrow head) 16

Each timeline shows the local relative order between events, but not the absolute time interval between events, nor the global order. Thus the basic model of time is relative Rules allow us to infer the partial ordering of events Rule 1. For every message m: send(m) occurs before receive(m) 17

This means that, e.g. receive(>lpr file) occurs before send( print(file, device) ) which occurs before receive(done) which occurs before send(>done(time) ) and e.g. send(done ) occurs before receive(done ) 18

We don’t know the absolute time between sending and receiving a message, i.e. message delay. e.g these two diagrams express the same scenario. B A AB “a” “b” “a” “b” SD 1 SD 2 19