Download presentation
Presentation is loading. Please wait.
Published byKatrina Flowers Modified over 9 years ago
1
1 LAB 03
2
2 What is Collaboration diagram? 4 Collaboration diagrams illustrate the interaction between the objects, using static spatial structure. 4 Unlike sequence diagram the time is not explicitly represented in these diagrams 4 In collaboration diagram the sequence of messages is indicated by numbering the messages. The UML uses the decimal numbering scheme. 4 In these diagrams, an actor can be displayed in order to represent the triggering of interaction by an element external to the system. 4 This helps in representing the interaction, without going into the details of user interface.
3
3 Components of collaboration diagram: 4 Named objects 4 Links: Links are represented by a continuous line between objects, and indicates the exchange of messages. 4 Messages has following attributes: Synchronization --thread name, step within thread. Sequence number Message labels : The name of the message often corresponds to an operation defined in the class of the object that is the destination of the message. Message names may have the arguments and return values. *[iteration]. It uses decimal notation. Message direction.
4
4 Semantics of components: 4 Object names identify which objects are participating and the links show which objects collaborate 4 A link between two objects must exist for one object to send message to another and vice a versa. 4 Messages in the collaboration diagram get transformed to more detailed signature. 4 They use the decimal notation system for numbering the messages. 4 The direction of the message defines the sender and receiver of the message
5
5 The elements of message: 4 Predecessor 4 Role names 4 Message qualifiers –Iteration expression –Parameters –Return values –Guard –Message stereotypes 4 Concurrent thread sequencing 4 Thread dependencies 4 Message expression [Pre] A1:*(expression):doIt(p,r):return value
6
6 The examples of message:
7
7 Collaboration diagram [for withdrawal of cash, normal flow.] 1. Insert card Enter password, Enter kind Enter amount, Take cash, Take card cancel,Terminate, Continue Display main screen unreadable card message, request password, request kind, request amount, canceled message, eject card, failure message, dispense cash, request take cash request continuation, print receipt, request take card bad account message, bad bank account message Verify account, process transaction Transaction succeed Transaction failed account o.k. bad account, bad password, bad bank code Create Transaction Transaction complete CUST- OMER BANK ATM TRANSA- CTION
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.