Concepts notations
Download
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
Concepts notations

Concepts & Notations

UML Sequence Diagram


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