UML Collaboration Diagrams UML Collaboration Diagrams Collaboration Diagram Semantics

Reviews
Shared by: Jay Gould
Stats
views:
146
rating:
not rated
reviews:
0
posted:
2/11/2009
language:
English
pages:
0
UML Collaboration Diagrams UML Collaboration Diagrams 4 Collaboration Diagram Semantics • Collaboration Diagram Notation • Collaboration Diagram Examples • Collaboration Diagram Issues Michael Jones UML Collaboration Diagrams 2 1 Collaboration Diagram Semantics • • Member of the Behavioural Group of diagrams Behavioural description includes – as well as Sequence, Statechart, and Activity diagrams – static - structural description on the participants – dynamic - description on the execution of the actions – set of participants and interactions which are meaningful in a c ontext – models the exchange of messages between objects to achieve something – operation or use case – class • • • Collaboration Purpose Can be attached to: • Parameterised collaboration – can be reused – can assist in defining the structural aspects of a design pattern Michael Jones UML Collaboration Diagrams 3 UML Collaboration Diagrams • Collaboration Diagram Semantics 4 Collaboration Diagram Notation • Collaboration Diagram Examples • Collaboration Diagram Issues Michael Jones UML Collaboration Diagrams 4 2 Collaboration Diagram Notation • • • • Represents a Collaboration and Interaction Collaboration Interaction Objects – set of objects and their interactions in a specific context – set of messages exchanged in a collaboration to produce a desired result – rectangles containing the object signature – object signature: object name : object Class • object name (optional) - starts with lowercase letter • class name (mandatory) - starts with uppercase letter – objects connected by lines – user (stick man) can appear – are labelled like C and Java function calls • followed by round brackets, and can have parameters and return values – are followed by an arrow to show direction – internal messages are numbered, starting from 1 Michael Jones UML Collaboration Diagrams 5 • Messages UML Collaboration Diagrams • Collaboration Diagram Semantics • Collaboration Diagram Notation 4 Collaboration Diagram Examples • Collaboration Diagram Issues Michael Jones UML Collaboration Diagrams 6 3 Collaboration Diagram Example • Scenario: refreshing the icons in a folder window refresh() :Renderer window:Window 1: refreshIcons(window) 1.1: create(icon) 1.1.1: add(self) :IconManager :BitmapGenerator Michael Jones UML Collaboration Diagrams 7 UML Collaboration Diagrams • Collaboration Diagram Semantics • Collaboration Diagram Notation • Collaboration Diagram Examples 4 Collaboration Diagram Issues Michael Jones UML Collaboration Diagrams 8 4 Collaboration Diagram Issues • Message Signature – guard • condition applied to the message • in square brackets at the start of the signature – – – – sequence number • numbers separated by dots, ending in a colon return value • name followed by := operation name argument list • names separated by commas, within round brackets • • Types of message flows – synchronous, asynchronous, simple Multiplicity of objects – how can messages sent to a multiplicity (e.g., an array) of objects be represented? UML Collaboration Diagrams 9 Michael Jones Types of Message Flows • Simple – indicates flow of control - sender waits until receiver processes message – default – shown by an 'empty' arrow • Synchronous – indicates nested flow of control – used to ensure that state cannot be compromised by external factors • e.g., not interrupted by the operating system – shown by a 'filled' arrow • Asynchronous – a signal from one object to another – shown as half an empty arrow Michael Jones UML Collaboration Diagrams 10 5 Multiplicity in Collaboration Diagrams • A server object needs to send a message to each user logged in, and another message to the audit object (which keeps a track of messages sent) :Admin 1. sendWarning(text:String) * :User 2. addMessage(text:String) :Audit Michael Jones UML Collaboration Diagrams 11 Summary • Collaboration Diagram Semantics – objects and messages – static representation of messages which could be sent – sequence of messages indicated • Collaboration Diagram Notation – rectangles for objects • object signature: name : Class – messages with arrows • message signature • [ guard] sequence number : result := messageName(int) • Collaboration Diagram Issues – multiplicity – when to use Michael Jones UML Collaboration Diagrams 12 6

Related docs
UML Diagrams
Views: 530  |  Downloads: 99
UML Tutorial Collaboration Diagrams
Views: 19  |  Downloads: 1
Introducing the UML and UML Diagrams
Views: 125  |  Downloads: 47
Sequence Diagrams and Collaboration Diagrams
Views: 47  |  Downloads: 2
UML Sequence Diagrams
Views: 80  |  Downloads: 22
UML
Views: 444  |  Downloads: 88
UML Component and Deployment Diagrams
Views: 52  |  Downloads: 5
UML Diagrams Overview
Views: 56  |  Downloads: 17
UML Class Diagrams Sequence Diagrams
Views: 20  |  Downloads: 1
UML-tutorial
Views: 504  |  Downloads: 70
premium docs
Other docs by Jay Gould
Louisiana Purchase Treaty info
Views: 209  |  Downloads: 0
Local business district
Views: 228  |  Downloads: 0
REQUEST UNDER FREEDOM OF INFORMATION ACT
Views: 254  |  Downloads: 3
1187[0]
Views: 155  |  Downloads: 0
MBGNewsletterQ305
Views: 139  |  Downloads: 0
Private Equity
Views: 699  |  Downloads: 28
Will Globalization Survive
Views: 269  |  Downloads: 10
Notice Of Intent To Enter
Views: 305  |  Downloads: 7
Net lease
Views: 328  |  Downloads: 3
Natural fathers application
Views: 207  |  Downloads: 0