Sequence diagrams -Creating

When creating a sequence diagram you must decide on what requirement or feature you are trying to represent. This could be an algorithm or a functional requirement. It will only show the sequence of a single piece of functionality. If more functionality needs to be shown this would be done in a separate diagram.

Once you have decided on what functional requirement you are trying to represent you must then decided on what objects will take part. These will go at the top of the diagram. Secondly you then need to decide on what methods need to be called and in what order. Remember that the order of the methods is critical to fulfilling the functional requirement which is being represented by the diagram.

A method CAN NOT go to a object if it is not active. Nor can a object be activated after it has been destroyed. As such you need to be a little careful about when and how you create or destroy an object. It may be tempting to just activate all objects and never destroy them. This is considered bad design and would lead to a over use of main memory and could also lead to memory leaks (where memory is lost and can not be recovered).