concepts notations
Download
Skip this Video
Download Presentation
UML Sequence Diagram

Loading in 2 Seconds...

play fullscreen
1 / 25

UML Sequence Diagram - PowerPoint PPT Presentation


  • 133 Views
  • Uploaded on

Concepts & Notations. UML Sequence Diagram. Acknowledgements. The material in this tutorial is based in part on: The Unified Modeling Language Reference Manual, 2 nd edition , by James Rumbaugh , Ivar Jacobson, and Grady Booch. Interaction View Interaction Diagram Sequence Diagram

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' UML Sequence Diagram' - dafydd


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
acknowledgements
Acknowledgements
  • The material in this tutorial is based in part on:
    • The Unified Modeling Language Reference Manual, 2nd edition, by James Rumbaugh, Ivar Jacobson, and Grady Booch
uml sequence diagram
Interaction View

Interaction Diagram

Sequence Diagram

Examples

UML Sequence Diagram
interaction view
Interaction View
  • Objects interact to implement behavior
  • Two ways to describe interaction
    • focus on individual objects (state machine)
    • focus on interactions of a collection of cooperating objects (interaction view)
  • Provides a more holistic view of the behavior of a set of objects
interaction diagram
Interaction Diagram
  • Collaboration Diagram
    • Emphasizes structural relations between objects
  • Sequence Diagram
    • Illustrates how objects interacts with each other
    • Emphasizes time ordering of messages
sequence diagram

book:Book

:BookCopy

borrow(book)

ok = mayBorrow()

[ok] borrow(member)

setTaken(member)

Sequence Diagram

member:LibraryMember

sequence diagram1

book:Book

:BookCopy

borrow(book)

ok = mayBorrow()

[ok] borrow(member)

setTaken(member)

Sequence Diagram

X-Axis (roles)

member:LibraryMember

Y-Axis (time)

sequence diagram2

book:Book

:BookCopy

borrow(book)

ok = mayBorrow()

[ok] borrow(member)

setTaken(member)

Sequence Diagram

X-Axis (roles)

member:LibraryMember

head symbol

Y-Axis (time)

life line

sequence diagram3

book:Book

:BookCopy

borrow(book)

ok = mayBorrow()

[ok] borrow(member)

setTaken(member)

Sequence Diagram

X-Axis (roles)

member:LibraryMember

head symbol

Y-Axis (time)

activation double line

life line

object

bDay:Date

Object
  • Naming
    • syntax
    • [instance Name]:[class Name]
  • Life line
    • represents the object’s life during the interaction
object1
Object
  • Active Object
    • holds the root of a stack executions
    • has its own thread of control
  • Passive Object
    • objects that are called by an active object
    • receive control only when called
object2

: Queue

actor1 : …

actor2 : …

Object

active object

passive object

active object

pull

pull

message
Message
  • An interaction between two objects
    • operation call
    • signaling
    • RPC
  • An arrow between the life lines of two objects
  • Labeled with
    • name
    • arguments
    • control information
message1

: Queue

actor1 : …

actor2 : …

Message

pull

pull

message

message

synchronous message
Synchronous Message
  • The routine that handles the message is completed before the caller resumes execution

synchronous message

:A

:B

doYouUnderstand()

Caller Blocked

yes

return (optional)

creation message
Creation Message
  • An object may create another object via a create() message

create message

Preferred

old:A

create()

:B

destruction message

old:A

new:B

destroy()

Destruction Message
  • An object may destroy another object via a destroy() message
examples

:PrintServer

:Queue

:PrinterProxy

job=dequeue()

Examples

Client

print(doc,client)

enqueue(job)

Repeated forever with 1 min interludes

[job]print(job.doc)

status

[job] done(status)

examples1

:PrintServer

:Queue

:PrinterProxy

job=dequeue()

Examples

Client

print(doc,client)

enqueue(job)

Repeated forever with 1 min interludes

[job]print(job.doc)

status

[job] done(status)

examples2

:PrintServer

:Queue

:PrinterProxy

job=dequeue()

Examples

Client

print(doc,client)

enqueue(job)

Repeated forever with 1 min interludes

[job]print(job.doc)

status

[job] done(status)

examples3

:PrintServer

:Queue

:PrinterProxy

job=dequeue()

Examples

Client

print(doc,client)

enqueue(job)

Repeated forever with 1 min interludes

[job]print(job.doc)

status

[job] done(status)

examples4

:PrintServer

:Queue

:PrinterProxy

job=dequeue()

Examples

Client

print(doc,client)

enqueue(job)

Repeated forever with 1 min interludes

[job]print(job.doc)

status

[job] done(status)

examples5

:PrintServer

:Queue

:PrinterProxy

job=dequeue()

Examples

Client

print(doc,client)

enqueue(job)

Repeated forever with 1 min interludes

[job]print(job.doc)

status

[job] done(status)

examples6

:PrintServer

:Queue

:PrinterProxy

job=dequeue()

Examples

Client

print(doc,client)

enqueue(job)

Repeated forever with 1 min interludes

[job]print(job.doc)

status

[job] done(status)

review
Review
  • Time on y-axis, roles on x-axis
  • Activation bars represent executions of procedures
  • Active objects have bars
  • Solid arrowheads: synchronous
  • Stick arrowheads: asynchronous
  • Dashed message lines: return

:PrintServer

ad