Download presentation
Presentation is loading. Please wait.
1
Sequence Diagram Objects are represented horizontally across the top of the diagram The first object is typically an Actor, the one who initiates Each object has a lifeline some exist before and/or after some are created during some are destroyed during An active object is indicated by a narrow rectangle (on the activation stack) Time is represented vertically down the diagram. Time moves forward as you go downwards
2
Diagramming notation :sales4:sale > sale Items: ArrayList items[i]: item A list of objects from the class item One item of the list the class salenamed instance unnamed instance Multiobject – a collection :item
3
Sequence Diagram Numbering is not required to know the message sequencing
4
Sequence diagram A payment object is created, and therefore shown lower down in the time sequence
5
Focus of control The sale object is activated three different times The sale object sends a message to the register object - this activation is distinct from the initial activation of the register
6
Showing returns
7
Message to ‘this’
8
Destroying an object A destroyed object is explicitly shown with a large X at that point in its lifeline
9
Conditional message
10
Mutually exclusive conditional messages
11
Iteration
12
Iteration over a sequence of messages
13
Iteration over a multiobject In this case, the sale object is sending the getSubtotal message synchronously to each of its salesLineItems
14
Iteration over a collection 3 rd edition :Sale lineItems[i] :SalesLineItem t=getTotal() st = getSubTotal() [i<lineItems.size]Loop
15
Messages to a class itself, not an object
16
> Calendar :Foo Message to class Invoke a static method
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.