Sept 2003 91.3913 Ron McFadyen Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together.

Slides:



Advertisements
Similar presentations
Chapter 15 UML Interaction Diagrams 1CS6359 Fall 2012 John Cole.
Advertisements

Object Design Examples with GRASP
Object-Oriented Analysis and Design CHAPTERS 15: UML INTERACTION DIAGRAMS 1.
Jan 23, Ron McFadyen1 SSD for a samplePOS Use Case Figure 13.1 Input Events invoke a system operation of the same name same idea as in object-oriented.
Sequence Diagram Objects are represented horizontally across the top of the diagram The first object is typically an Actor, the one who initiates Each.
March Ron McFadyen1 Ch 17: Use Case Realizations with GRASP Patterns Assigning responsibilities to objects to achieve user goals Section 17.4.
Sequence Diagram Objects are represented horizontally across the top of the diagram Each object has a lifeline some exist before and/or after some are.
Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together to achieve some functionality.
Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects show the flow of control across many objects used to.
Jan Ron McFadyen1 Consider a simple cash-only Process Sale scenario 1. Customer arrives at a POS checkout with goods and/or services to purchase.
Sept Ron McFadyen Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together.
Sept Ron McFadyen Sequence Diagram Objects are represented horizontally across the top of the diagram The first object is typically an Actor,
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
Sept Ron McFadyen Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together.
Chapter 15 Interaction Diagrams. Most Common Sequence Diagram Communication Diagram Sequence Diagrams illustrate interactions between classes of a program.
Winter 2007ACS-3913 Ron McFadyen1 Classes Represented by a rectangle with possibly 3 compartments Customer Name Address Customer Name Address getName()
Feb 4, Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – (interfaces,
November Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – interfaces,
Object-Oriented Analysis and Design
Sept Ron McFadyen1 Extend Relationship.
Sequence Diagram Objects are represented horizontally across the top of the diagram The first object is typically an Actor, the one who initiates Each.
SE-565 Software System Requirements More UML Diagrams.
Designing with Interaction and Design Class Diagrams Chapters 15 & 16 Applying UML and Patterns Craig Larman With some ideas from students in George Blank’s.
SENG 403 SENG 403 – Winter  Brief introduction to SSD  Example (A sales systems (Cashier))  Example (Monopoly game) SENG 403 – Winter 2012.
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
Interactions. 2 Objects communicate with each other by sending messages. Sending a message is another name for a member function call. –Some C++ examples.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
Interaction diagrams Sequence and collaboration diagrams.
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
Introduction to Interaction Diagrams Used to illustrate the dynamic behaviour of a community of objects that collaborate by passing messages in order to.
1 Sequence Diagrams (Based on Stevens and Pooley (2006, Chapters 9, 10) and Fowler (2004, Chapter 4)) David Meredith Aalborg University.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 9: Interaction.
Starting Object Design
Chapter 4: UML Interaction Diagrams. Objective Provide a reference for frequently used UML interaction diagram notation- sequence and communication diagrams.
Collaboration Diagrams CSIS3600. What is a Collaboration Diagram Collaboration diagrams illustrate interactions between objects The collaboration diagram.
Interaction Diagram Notation
Object-Oriented Analysis and Design Feb 11, 2009.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Collaboration diagrams. Purpose A collaboration diagram is an alternate way to show a scenario. A collaboration diagram shows the objects and relationships.
1 LAB What is Collaboration diagram? 4 Collaboration diagrams illustrate the interaction between the objects, using static spatial structure. 4.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
OO Methodology Elaboration Phase Iteration 1- Part 3.
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
Use-Case Model: Adding Detail with Operation Contracts.
Jan 2005Ron McFadyen Qualified Associations ProductCatalogueProductDescription A one to many association can be altered in a diagram to a one.
1 Kyung Hee University Interaction Diagrams Spring 2001.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
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.
Design Model: Determining Visibility CH-18. Objectives Identify four kinds of visibility. Design to establish visibility. Illustrate kinds of visibility.
Interactions.
Collaboration Diagrams
Used to help understand requirements more completely
UML Interaction Diagrams
Chapter 11: Collaboration Diagram - PART1
Communication DIAGRAM
Princess Nourah bint Abdulrahman University
Requirements To Design In This Iteration
Princess Nourah bint Abdulrahman University
IMAT5205 Systems Analysis and Design
Communication Diagrams
Sequence Diagrams Getting the Message.
Communication DIAGRAM
Chapter 11: Class Diagram
UML Interaction Diagrams
Design Model: Creating Design Class Diagrams
Chapter 4 Sequence Diagrams
Presentation transcript:

Sept Ron McFadyen Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together to achieve some functionality required in the system used to illustrate the design required to achieve the purpose Types Communication/Collaboration diagram Sequence diagram

Sept Ron McFadyen Sample Collaboration Diagram Suppose an event such as a light turning red occurs, and the traffic light must send a message to the camera letting it know that a red light occurred. PortageMain: trafficLight pm: camera changeToRed() 1:changeToRed() 1.1:takePhoto()

Sept Ron McFadyen Sample Sequence Diagram Suppose an event such as a light turning red occurs, and the traffic light must send a message to the camera letting it know that a red light occurred. PortageMain: trafficLightpm: camera changeToRed() takePhoto()

Sept Ron McFadyen Interaction Diagrams Messages asynchronous or synchronous components numbered (collaboration diagram) guard name parameter list name is mandatory... others as required

Sept Ron McFadyen Messaging Synchronous messages asynchronous messages return messages We will assume (at first) that all messages are synchronous: if object A sends a message to object B then A is suspended object B gains control, and B begins to compute object A waits until B responds (i.e. B sends a message back to A) When an asynchronous message is sent from A to B, A does not pause and wait for B to finish … results in multiple threads of control.

Sept Ron McFadyen Collaboration Diagram Timing is understood by the numbering scheme. We use a nested decimal numbering to indicate the order in which messages are sent Many messages may be sent across one link :Student:Student Objects are represented similarly to classes in a class model … relationships are indicated as links between objects named or unnamed :Student:Student 2 nd edition 3 rd edition

Sept Ron McFadyen Collaboration diagram for makePayment Messages numbered 1.1, 1.2, … are sent in response to receipt of message numbered 1. Return messages are often left out

Sept Ron McFadyen Message to ‘this’ or an object itself A message sent from an object to itself (i.e. invoking one of its own methods) is indicated by a reflexive link, but this does not imply a reflexive association

Sept Ron McFadyen Instance creation We will use a create message to indicate that an object is being instantiated

Sept Ron McFadyen Sequence Numbering The initial message triggering the collaboration is unnumbered. All messages sent as the result of an object receiving a message numbered X, are prefixed with “X.” Note: pay special attention to the numbering

Sept Ron McFadyen Complex numbering We need a numbering scheme to know the order of messages

Sept Ron McFadyen Conditional Message A guard (enclosed in square braces [ ] ) indicates a condition that must be true for the message to be sent

Sept Ron McFadyen Mutually exclusive messages a, b, etc are used as suffixes to indicate mutually exclusive messages. A guard would also be used

Sept Ron McFadyen Iteration Numbered 1 Iteration indicator * Guard [i:=1..N]

Sept Ron McFadyen Iteration over a multiobject A multi-object represents a collection of objects. E.g. the SalesLineItems for a Sale; E.g. the ProductSpecifications for a ProductCatalog 2 nd edition

Sept Ron McFadyen Iteration over a collection On the right hand side is one object/instance from the collection E.g. the SalesLineItems for a Sale; E.g. the ProductSpecifications for a ProductCatalog 3 rd edition :Sale lineItems[i]: SalesLineItem t = getTotal 1 * [i=1..n]: st = getSubtotal

Sept Ron McFadyen Messages to a class itself, not an object A message may be sent to the class, and not to a specific object. 2 nd edition

Sept Ron McFadyen Messages to a class itself, not an object A message may be sent to the class, and not to a specific object. 3 rd edition discusses messages sent to a > … in Java, classes are considered instances of class Class… Class is considered a metaclass :Foo > Calendar doX getAvailableLocales 3rd edition