sequence diagram
sequence diagram
1. What are System sequence diagram? What is the relationship between SSD and UseCase
?Explain with example.
Use cases describe how external actors interact with the software system. During this
interaction an actor generates system events to a system, usually requesting some system
operation to handle the event.
A system sequence diagram (SSD) is a picture that shows, for a particular scenario
of a use case, the events that external actors generate their order, and inter-system
events.
External actors
Messages invoked by these actors
Return values associated with previous messages
Indication of any loops or iteration area
Example of an SSD
Relationship between SSDs and Use Cases
Sequence diagram is used to represent one scenario of the use case .Hence it can be derived by
observing the use case.
Example:
Guidelines
Following guideline is used while designing the SSD
The sequence diagram generally represents only one scenario of use case model.
System event must be represented at the abstract level.
The system event must be usually a verb. For example display, enter, select, eject and so
on.
The sequence diagram can represent the collaboration with other external systems.
2. Explain with an example, how interaction diagrams are used to model the dynamic
aspects of a system.
Interaction diagram:
1. Sequence diagram
2. Collaboration diagram
1. Sequence diagram:
A Sequence diagram simply depicts interaction between objects in a sequential order i.e the
order in which these interactions take place.
1. Lifeline boxes
2. Activation
Activation boxes represent the time an object needs to complete a task.
3. Messages
4. Found Message
5. Lost Message
7. Self-Message
8. Create Message
The X at the bottom of an activation box indicates that the object has been removed.
12. Looping
Iteration or Loop is used to indicate certain operations will be executed ‘n’ number of times.
Mutually Exclusive Message indicates that either one of the messages can be passed based on the
condition.
Example:
2. Collaboration diagram
A collaboration diagram shows the objects and relationships involved in an interaction and the
sequence of messages exchanged among the objects during the interaction.
1. Link
A link is a connection path between two objects; it indicates navigation and visibility between
the objects.
2. Messages
Each message between objects is represented with a message expression and small arrow
indicating the direction of the message.
4. Creation of Instances
Any message can be used to create an instance. The create message may include parameters,
indicating the passing of initial values.
6. Conditional Messages
The message is only sent if the clause evaluates to true.
Mutually Exclusive Message indicates that either one of the messages can be passed on the
condition.
8. Iteration or Looping
Iteration or Loop is used to indicate certain operations will be executed ‘n’ number of times.
Example:
Activity diagram is basically a flowchart to represent the flow from one activity to
another activity.
Activity diagram is used to describe the dynamic aspects of the system.
Purpose
1.Initial State
A small filled circle followed by an arrow represents the initial action state or the start point for
any activity diagram.
3.Action Flow
Action flows or Control flows are also referred to as paths and edges. They are used to show the
transition from one activity state to another.
When we need to make a decision before deciding the flow of control, we use the decision node.
5.Guards
In UML, guards are a statement written next to a decision diamond that must be true before
moving to the next activity.
6.Fork
A fork node is used to split a single incoming flow into multiple concurrent flows.
7.Join
A join node joins multiple concurrent flows back into a single outgoing flow.
8.Merge
A diamond with several flows entering and one leaving.
An arrow pointing to a filled circle nested inside another circle represents the ending point.
Event
States
Transitions
The relationship between the two states is indicated using the transition.
Example: When the system operator performs startup the transition from idle state to active state
occurs.
Guard:
A transition may be condition guard which represents the Boolean test .when the condition
results true then only further state change occurs.
Nested states: