0% found this document useful (0 votes)
39 views14 pages

Sequence Diagram UML

The document explains what a sequence diagram is and how to create one. It defines key parts of a sequence diagram like participants and messages. It provides examples and explanations of how to represent objects, messages, lifetimes, and more in a sequence diagram.

Uploaded by

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

Sequence Diagram UML

The document explains what a sequence diagram is and how to create one. It defines key parts of a sequence diagram like participants and messages. It provides examples and explanations of how to represent objects, messages, lifetimes, and more in a sequence diagram.

Uploaded by

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

Sequence Diagram

Prepared By Orwah Aladaileh 1-1


What is Sequence Diagram?
• interaction
diagram"
that models
a single
scenario
executing in
the system.
• perhaps 2nd most used
UML diagram (behind class
diagram)

Prepared By Orwah Aladaileh


Key parts of a sequence diag.
 participant: an object or entity that acts in the
sequence diagram
 sequence diagram starts with an unattached "found
message" arrow

 message: communication between participant


objects

 the axes in a sequence diagram:


 horizontal: which object/participant is acting
 vertical: time (down -> forward in time)

Prepared By Orwah Aladaileh


Sequence dg. from use case

Prepared By Orwah Aladaileh


Representing objects
 Squares with object type, optionally preceded by
object name and colon
 write object's name if it clarifies the diagram
 object's "life line" represented by dashed vert. line

Prepared By Orwah Aladaileh


Representing objects
Objects: aStudent is a specific
instance of the Student class

Generic (unnamed)
Specific Generic
objects(unnamed)
Instance of an objects of class type Seminar
Object and Course

Prepared By Orwah Aladaileh


Representing objects

execution
lifeline

Prepared By Orwah Aladaileh


Messages between objects
 message (method call) indicated by
horizontal arrow to other object
 write message name and arguments above
arrow

Prepared By Orwah Aladaileh


Messages, continued
 message (method call) indicated by
horizontal arrow to other object
 dashed arrow back indicates return
 different arrowheads for normal / concurrent
(asynchronous) methods

Prepared By Orwah Aladaileh


Messages, continued

Method call

Return value

Prepared By Orwah Aladaileh


Lifetime of objects
 creation: arrow with 'new'
written above it
 notice that an object created
after the start of the scenario
appears lower than the
others

 deletion: an X at bottom of
object's lifeline
 Java doesn't explicitly delete
objects; they fall out of
scope and are garbage-
collected

Prepared By Orwah Aladaileh


Lifetime of objects, continued

Prepared By Orwah Aladaileh


Example
 Draw a sequence diagram for making a
peanut butter and jelly sandwich if the
following objects are alive: knife,
peanut butter jar , jelly jar, bread, plate.
I may or may not want the crusts cut
off. Don’t forget to open and close
things like the jars, and put yourself
away, cleanup,

Prepared By Orwah Aladaileh


References

• Valacich, Joseph S. Essentials of systems analysis and


design / Joseph S.Valacich, Joey F. George, Jeffrey A.
Hoffer.—5th ed.
• System Analysis, Design, and Development Concepts,
Principles, and Practices
Charles S. Wasson ISBN-13 978-0-471-39333-7.
• Example diagrams from:
http://www.ibm.com/developerworks/rational/library/3101.htm
l
.

PREPARED BY: DR. RANEEM QADDOURA

You might also like