Showing posts with label Interactions. Show all posts
Showing posts with label Interactions. Show all posts

Sunday, May 27, 2012

What is a Sequence Diagram?

A sequence diagram is a UML (Unified Modelling Language) diagram. It is used to show the interactions between objects in the sequence they occur.


Here is a class diagram of the objects in the system...

The sequence diagram below, models the interactions required to get the 'Message' from the SpecialPower object.



Where a class diagram shows the details of each class & the relationships between them; a sequence diagram shows the sequential interactions between these objects.


Lifelines
Each object has a lifeline. This is a dashed line. The solid areas denote when an object is active in a process.




Numbering

Notice that each interaction in the sequence diagram is numbered according to the sequential flow of execution.



Void


In design documentation, where no value is returned from an interaction, the word 'void' is often used. A 'void' return is often seen as the result of instantiating an object. This is because a constructor cannot return a value. As well as that, you could expect to see 'void' as the return from a sub procedure.



"UML basics: The sequence diagram" ( http://ibm.co/Lk8yqN )

err....here's a cat: