Presentation is loading. Please wait.

Presentation is loading. Please wait.

Concepts & Notations. Acknowledgements  The material in this tutorial is based in part on: The Unified Modeling Language Reference Manual, 2 nd edition,

Similar presentations


Presentation on theme: "Concepts & Notations. Acknowledgements  The material in this tutorial is based in part on: The Unified Modeling Language Reference Manual, 2 nd edition,"— Presentation transcript:

1 Concepts & Notations

2 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

3  Interaction View  Interaction Diagram  Sequence Diagram  Examples

4 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

5 Interaction Diagram  Collaboration Diagram Emphasizes structural relations between objects  Sequence Diagram Illustrates how objects interacts with each other Emphasizes time ordering of messages

6 Sequence Diagram member: LibraryMember book:Book :Book Copy borrow(book) ok = mayBorrow() [ok] borrow(member) setTaken(member)

7 Sequence Diagram member: LibraryMember book:Book :Book Copy borrow(book) ok = mayBorrow() [ok] borrow(member) setTaken(member) X-Axis (roles) Y-Axis (time)

8 Sequence Diagram member: LibraryMember book:Book :Book Copy borrow(book) ok = mayBorrow() [ok] borrow(member) setTaken(member) X-Axis (roles) Y-Axis (time) head symbol life line

9 Sequence Diagram member: LibraryMember book:Book :Book Copy borrow(book) ok = mayBorrow() [ok] borrow(member) setTaken(member) X-Axis (roles) Y-Axis (time) head symbol life line activation double line

10 Object  Naming syntax [instance Name]:[class Name]  Life line represents the object’s life during the interaction bDay:Date

11 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

12 Object pull : Queueactor1 : …actor2 : … active object passive object

13 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

14 Message pull : Queueactor1 : …actor2 : … message

15 Synchronous Message  The routine that handles the message is completed before the caller resumes execution :A:B doYouUnderstand() Caller Blocked return (optional) yes synchronous message

16 Creation Message  An object may create another object via a create() message old:A create() :B Preferred create message

17 Destruction Message  An object may destroy another object via a destroy() message old:Anew:B destroy()

18 Examples print(doc,client) Client :PrintServer:Queue :Printer Proxy enqueue(job) status job=dequeue() [job]print(job.doc) [job] done(status) Repeated forever with 1 min interludes

19 Examples print(doc,client) Client :PrintServer:Queue :Printer Proxy enqueue(job) status job=dequeue() [job]print(job.doc) [job] done(status) Repeated forever with 1 min interludes

20 Examples print(doc,client) Client :PrintServer:Queue :Printer Proxy enqueue(job) status job=dequeue() [job]print(job.doc) [job] done(status) Repeated forever with 1 min interludes

21 Examples print(doc,client) Client :PrintServer:Queue :Printer Proxy enqueue(job) status job=dequeue() [job]print(job.doc) [job] done(status) Repeated forever with 1 min interludes

22 Examples print(doc,client) Client :PrintServer:Queue :Printer Proxy enqueue(job) status job=dequeue() [job]print(job.doc) [job] done(status) Repeated forever with 1 min interludes

23 Examples print(doc,client) Client :PrintServer:Queue :Printer Proxy enqueue(job) status job=dequeue() [job]print(job.doc) [job] done(status) Repeated forever with 1 min interludes

24 Examples print(doc,client) Client :PrintServer:Queue :Printer Proxy enqueue(job) status job=dequeue() [job]print(job.doc) [job] done(status) Repeated forever with 1 min interludes

25 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


Download ppt "Concepts & Notations. Acknowledgements  The material in this tutorial is based in part on: The Unified Modeling Language Reference Manual, 2 nd edition,"

Similar presentations


Ads by Google