1 / 11

Sequence and Interaction Diagrams

James Brucker. Sequence and Interaction Diagrams. Sequence Diagrams. objectName : Class. run(). Time. Activation bar: when method is active. Lifeline. What goes in the Box?. Boxes represent objects . Text is box is: name : ClassName Object name or ClassName may be empty (blank).

timothym
Download Presentation

Sequence and Interaction Diagrams

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. James Brucker Sequence and Interaction Diagrams

  2. Sequence Diagrams objectName : Class run() Time Activation bar: when method is active. Lifeline

  3. What goes in the Box? Boxes represent objects. Text is box is: name : ClassName Object name or ClassName may be empty (blank). Show the object reference name (p1) if it is used elsewhere in the diagram. p1 : Person :Person p1 :

  4. Found Message and Creation objectName : Class run() Time Activation bar: when method is active. class Main { void run( ) { Person p = new Person("Cat"); String s = p.getName( ); p.setName( "Bird" ); Lifeline

  5. Self-call one method calls another method of the same object Other way to show return value.

  6. Synchronous & Asynchronous Calls

  7. Sequence Diagrams (contd) Other kinds of method calls: Self-call: method calls another method in same object An object sends a message to itself Call-back: A calls B, then B calls A. Not the same as "return"!

  8. Static Method Call Use a separate box with stereotype <<class>>. Larman says to write <<meta>> instead.

  9. Interaction Diagrams: Flat Sequences message 1 : liftHandset() c : Caller : Telephone sequence number, flat flow of control 2 : assertCall() : Exchange anonymous object

  10. Procedural Sequences : View 2 : clickAt(p) 2.2 : putRecentPick(I) c : Controller : Cache sequence number, nested flow of control 2.1 : I=findAt(p)

  11. An Interaction Diagram 2 : addStudent() r : RegistrarAgent : School 1 : create() 3.1 : getSchedule() 3 : register() s : Student registered=False s : Student registered=True 3.4 : become() 3.2 : add(s) 3.3 : add(s) c1 : Course c2 : Course

More Related