The following figure depicts the arrangement of objects and messages in a sequence diagrams.
• Header Elements of sequence diagrams.Actor: -indicate an external person or entity that negotiate with the system .
Object: -Represents an instance in the system or one of its components.
Unit:-Represents a subsystem, component, unit, or other logical entity in the system (may or may not be implemented by objects)
Separator: - Represents an interface or boundary between subsystems, components or units (e.g., air interface, Internet, network)
Group: -Groups related header elements into subsystems or components.
Action: -Represents an action taken by an actor, object or unit.
Destroy Element: - Represents the destruction of a header element.
Message return: - A return message between header elements.
What is recursion?
Sometimes an object has an operation that invokes itself. This is called recursion.
Following figure show the recursion in sequence diagrams.