0% found this document useful (0 votes)
47 views

Unit 5 (C)

The document describes sequence diagrams and their components. A sequence diagram shows the interaction between objects through messages to perform a use case. It includes objects, activation boxes, lifelines, messages, and other symbols. Sequence diagrams break down use cases into individual tasks or scenarios to show the message flow and timing between objects. They are used to model dynamic behavior and communications between systems.

Uploaded by

meet 0102
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Unit 5 (C)

The document describes sequence diagrams and their components. A sequence diagram shows the interaction between objects through messages to perform a use case. It includes objects, activation boxes, lifelines, messages, and other symbols. Sequence diagrams break down use cases into individual tasks or scenarios to show the message flow and timing between objects. They are used to model dynamic behavior and communications between systems.

Uploaded by

meet 0102
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Sequence Diagram

A Sequence diagram shows the participants (Objects) in an interaction and the sequence of
message among them.

 A sequence diagram shows the interaction of a system with its actors to perform all or part of a
use case.
 Sequence diagram represent the dynamic communication between object during execution of
task.
 Each use case requires one or more sequence diagram to describe its behavior.
 Each sequence diagram shows a particular behavior sequence of the use case.
 It is best to show a specific portion of a use case and not attempt to be too general.
 You can draw a separate sequence diagram for each task.

1
Components of Sequence Diagram
Object - Class Roles or Participants Object : Class

 Class roles describe the way an object will behave in context.


 Use the UML object symbol to illustrate class roles, but don't list object attributes.

Activation or Execution Occurrence


 Activation boxes represent the time an object needs to complete a task.
 When an object is busy executing a process or waiting for a reply message, use
a thin gray rectangle placed vertically on its lifeline.
Lifeline
 A lifeline represents an Object in an interaction.
 When that object's lifeline ends, you can place an X at the end of its lifeline to
X
denote a destruction occurrence.

2
Components of Sequence Diagram Cont.
Messages
 Messages are arrows that represent communication between objects.
 Use the following arrows and message symbols to show how information is transmitted
between objects.
Synchronous message
 Represented by a solid line with a solid arrowhead.
 This symbol is used when a sender must wait for a response to a message before it continues.
 The diagram should show both the call and the reply.
Asynchronous message
 Represented by a solid line with a lined arrowhead.
 Asynchronous messages don't require a response before the sender continues.
 Only the call should be included in the diagram.
3
Components of Sequence Diagram Cont.
Reply message
 Represented by a dashed line with a lined arrowhead.
 these messages are replies to calls.

Delete message X

 Represented by a solid line with a solid arrowhead, followed by an X.


 This message destroys an object.

4
Guideline for Sequence Diagram
Prepare at least one scenario per use case Abstract the scenarios into sequence diagrams.
 The steps in the scenario should be  The sequence diagrams clearly show the
logical commands, not individual button contribution of each actor.
clicks.
 It is important to separate the contribution of
 You can specify the exact syntax of input. each actor as a prelude to organizing
 Start with the simplest mainline behavior about objects.
interaction - no repetitions, one main
activity, and typical values for all Divide complex interactions
parameters.  Break large interactions into their constituent
 If there are substantially different tasks and prepare a sequence diagram for
mainline interactions, write a scenario for each of them.
each.
Prepare a sequence diagram for each error condition.
 Show the system response to the error condition.
5
Steps to Draw a Sequence Diagram
Step-1 Select one scenario
Step-2 Identify the necessary set of the objects. Who is taking part ?
Step-3 Identify the necessary interactions/steps.
Step-4 Describe the message exchange between object.
Step-5 Identify the sequence of interactions and who starts Interactions.

6
Example: Sequence Diagram for Book Issue
 Book issue is a one business process or a function in Library Management System.
 Necessary objects for book issue process are Librarian, Book, Member and Transaction .
 Member class object starts the interaction.
 Various interactions in book issue process are
1 Request for a book
2 Check availability of book
3 Validate the member
4 Check No. of books issued by member
5 Add book issue details to transaction
6 Update no of book issued by member
7 Update book status
7
Sequence Diagram for Book Issue

L:Librarian B:Book MR: Member


1. Request for a book
2. Check availability of book

3. Book available rack no.


4. Validate Member
5. Response for validation
6. Check no of book issued

7. Book can be issued

8. Update book status

9. Update member status

You might also like