Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.

Slides:



Advertisements
Similar presentations
ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
Advertisements

UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
Introduction to Software Engineering 7. Modeling Behaviour.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Interaction Diagrams Activity Diagram State Machine Diagram
Drawing System Sequence Diagrams
Systems Analysis and Design in a Changing World, Fourth Edition
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Interaction Diagrams.
Object Collaborations. Objectives: Object Interaction (cont.) You will be able to:  Use sequence diagrams to detail object interactions.
Dynamic modeling using UML
NJIT Drawing System Sequence Diagrams Chapter 10 Applying UML and Patterns Craig Larman Presented by Anuradha Dharani.
SE-565 Software System Requirements More UML Diagrams.
חוזים – Contracts 1. Larman – Chapter 10 – SSDs 10.2 What are System Sequence Diagrams? (introduction) Use cases describe how external actors interact.
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.
Unified Modeling Language
LECTURE 5 SEQUENCE DIAGRAM 1. INTRODUCTION – SYSTEM SEQUENCE DIAGRAM A system sequence diagram is a fast and easily created artifact that illustrates.
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
USE Case Model.
Sequence Diagram Tutorial
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
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.
Interaction diagrams Sequence and collaboration diagrams.
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Collaboration Diagrams CSIS3600. What is a Collaboration Diagram Collaboration diagrams illustrate interactions between objects The collaboration diagram.
Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence.
Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram.
Chapter 1 Applying UML and Patterns. The Need for Software Blueprints Knowing an object-oriented language and having access to a library is necessary.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Drawing System Sequence Diagrams
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
Business Analysis with For PG MDI, Gurgaon Kamna Malik, Ph.D.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
Collaboration diagrams. Purpose A collaboration diagram is an alternate way to show a scenario. A collaboration diagram shows the objects and relationships.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
Systems Analysis and Design in a Changing World, Fourth Edition
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
Chapter 3: Introducing the UML
UML - Development Process 1 Software Development Process Using UML.
 The Sequence Diagram models the collaboration of objects based on a time sequence.  It shows how the objects interact with others in a particular scenario.
Appendix Object-Oriented Analysis and Design: Use Cases and Sequence Diagrams Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
Project 2: Phase 1 Submission 7 Late submissions 10% 10 No submissions 14% Better than project 1 phase 3 submissions 10-point bonus: If you catch the deadline.
Systems Analysis and Design in a Changing World, Fourth Edition
UML Diagrams By Daniel Damaris Novarianto S..
Chapter 11: Collaboration Diagram - PART1
Unified Modeling Language
Sequence Diagram.
UML Diagrams Jung Woo.
Sequence Diagrams.
Princess Nourah bint Abdulrahman University
Object Oriented Analysis and Design
Princess Nourah bint Abdulrahman University
Sequence Diagrams Lecture 6.
Week 12: Activity & Sequence Diagrams
CIS 375 Bruce R. Maxim UM-Dearborn
Unified Modelling Language
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
UML Interaction diagrams
CIS 375 Bruce R. Maxim UM-Dearborn
Presentation transcript:

Discovering object interaction

Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is captured in the flow of events. Scenarios are used to describe how the use cases are realised as interactions among societies of objects.

Scenarios A scenario is simply an instance of a use case. –It is one path through the flow of events for the use case. Scenarios are developed to help identify the objects, classes, and the object interactions needed to carry out a piece of functionality specified by the use case. Scenarios document decisions how the responsibilities specified in the use case are distributed among classes and objects in the system.

Scenarios Provide an excellent communication media to be used in the discussion of the system. –They speak the language of the end user and domain experts. Each use case is a web of scenarios –Primary scenario – is the normal flow of the use case –Secondary scenarios – the what if logic of the use case.

Documenting scenarios The flow of events for a use case is captured in text whereas scenarios are captured in interaction diagrams.

Interaction Diagrams Interaction diagrams model the behavior of use cases by describing the way groups of objects interact to complete the task. Interaction diagrams are used to define and clarify the roles of the objects that perform a particular flow of events of a use case. –They are the primary source of information used to determine class responsibilities and interfaces. There are two types of interaction diagrams. –Sequence diagrams and –Collaboration diagrams The collaboration diagram and the sequence diagram are interchangeable, they show the same use-case realization, but they focus on different aspects of the interaction.

When to Use: Interaction Diagrams Interaction diagrams are used when you want to model the behavior of several objects in a use case. They demonstrate how the objects collaborate for the behavior. Interaction diagrams do not give a in depth representation of the behavior. If you want to see what a specific object is doing for several use cases use a state diagram. To see a particular behavior over many use cases or threads use an activity diagrams.

How to Draw: Interaction Diagrams Sequence diagrams, collaboration diagrams, or both diagrams can be used to demonstrate the interaction of objects in a use case. Sequence diagrams generally show the sequence of events that occur. Collaboration diagrams demonstrate how objects are statically connected. Both diagrams are relatively simple to draw and contain similar elements.

Sequence Diagrams A sequence diagram is a picture that shows, for a particular scenario of a use case, the events that external actors generate, their order, and possible inter- system events. All systems are treated as a black box; the diagram places emphasis on events that cross the system boundary from actors to systems.

Sequence diagrams Shows object interactions arranged in time sequence. Depicts –the objects and classes involved in the scenario and –the sequence of messages exchanged between the objects Sequence diagrams typically are associated with use case realisations

Drawing System Sequence Diagrams System Behaviour and UML Sequence Diagrams –It is useful to investigate and define the behaviour of the software as a “black box”. –System behaviour is a description of what the system does (without an explanation of how it does it). –Use cases describe how external actors interact with the software system. During this interaction, an actor generates events. –A request event initiates an operation upon the system.

Basic Sequence Diagram Symbols and Notations Class roles Class roles describe the way an object will behave in context. Use the UML object symbol to illustrate class roles, but don't list object attributes.

Activation Activation boxes represent the time an object needs to complete a task. They indicate whenever a method is active, They show methods which are waiting for returns.

Messages Messages are arrows that represent communication between objects. Use half-arrowed lines to represent asynchronous messages. Asynchronous messages are sent from an object that will not wait for a response from the receiver before continuing its tasks. An asynchronous message is a message that does not block the caller, i.e., caller and receiver execute concurrently.

Messages

Lifelines Lifelines are vertical dashed lines that indicate the object's presence over time.

Destroying objects Objects can be terminated early using an arrow labeled " >" that points to an X.

Loops A repetition or loop within a sequence diagram is depicted as a rectangle. Place the condition for exiting the loop at the bottom left corner in square brackets [ ].

Sequence diagrams Object name Object name and class Class Name( Anonymous object In UML an object is a sequence diagram is drawn as a rectangle containing the name of the, underlined An object can named can be named in one of the following three ways

Object names Can be specific e.g algebra Or they can be general e.g course offering Often an anonymous object (class name only) may be used to represent any object in the class. Each object also has its timeline represented by a dashed line below the object. Messages between objects are represented by arrows that point from the client (Sender of the message) to the supplier( receiver)

UML notation for objects and messages

Sequence diagrams and boundary classes Boundary classes are added to sequence diagrams to show the interaction with the user or with another system. The actual messages from the actor to the boundary class along with their sequence information are dependant upon the applications framework that is chosen later in development.

Example

Example: Drawing System Sequence Diagrams Example when the cashier enters the item id, the cashier is requesting the POS system to record that item’s sale. That request event initiates an operation upon the system.. It is desirable to identify the operations that an external actor requests of a system, because they very important in as far as understanding the system behaviour is concerned. UML uses the system sequence diagram to illustrate the actor interactions and the operations initiated by them.

Example: Drawing System Sequence Diagrams A system sequence diagram is a picture that shows for a particular scenario of the use case, the events that external actors generate, their order and inter system events. We design a system sequence diagram for the main success scenario of the use case and the complex alternative scenarios.

Process Sale Scenario example

Sequence diagrams and Use Cases

The ATM example

Complexity and sequence diagrams How complex should a sequence diagram be? Just keep it as simple as possible. Make sure that it is very easy to see the objects, interactions, the messages and the functionality captured by the scenario.