Where the flow of control is synchronous there is only one thread of execution – the activity passes from one lifeline to another The message arrows are the same as those for sequence diagrams Messages are shown by an arrow pointing in the direction that the message is sent and a label that specifies the messageĪ message is the same as a message in Sequence diagrams, and is defined as a specification of the conveyance of information from one instance to another with the expectation that activity will ensueĪ message may specify the raising of a signal or the call of an operationĪn operation being invoked on another objectĬreation/destruction of an object instance Links are ONLY drawn on communication diagrams to support the passing of messages between the participants in the interaction Syntax for name of lifeline is the same as for Sequence diagrams. Here is the Sequence diagram for the price calculating use case.Ĭommunication Diagram of the Calculate Order Price use case Look at each class to see what information objects of the class would hold and what operations they can carry out. This is what we mean when we talk of passing messages. In order to carry out the task - calculate the order price - the objects have to communicate with each other. Here is the class siagram for the use case If used like this, it’s a similar technique to CRC cards. However, Communication diagrams are easier to draw and to change quickly. Sequence diagrams are better for showing control logic, like loops and selection (if. In general : sequence diagrams are better at showing the sequence of calls (messages) ommunication diagrams are better at showing links between objects/participants. If they’re similar to sequence diagrams, why do we need them and when do we use them? We need to remember that the process of developing an Object-Oriented System is iterative – these interaction diagrams might identify new classes/attributes/operations that need to be added to the class diagram They can also be used to specify the objects that take part in operations Refer to Module Handout B for a detailed descriptionĬan be used while the class diagrams are being elaborated to help the analyst understand the groupings of objects that participate in the realisation of the use case ![]() Like sequence diagrams, they are used to model interactions between objects that deliver the functionality of a use case by showing the messages that are passed between participants (usually objects)Ī communication diagram looks like a class/object diagram, but it has : messages added to the links between classes a numbering system before each message to give the order in which they are sent. Previously (before UML 2) called collaboration diagrams Sequence diagrams : show interactions and emphasise the order of the messages over timeĬommunication (collaboration) diagrams : Show same interaction in the context of the classes that participate in the interaction Show the structural relationships of the classes to one another 9.0 Communication (Collaboration) Diagrams, Timing Diagrams, Interaction Overview Diagrams
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |