• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question about Sequence Diagram

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI, I have a Doubt about Sequence Diagram.
Imagine this 2 objetcts, that pertence Sequence Diagram below.

ObjA ObjB
event ----------------> * --------methodX()---------> *
* *
* *
* *
* *
* *

The methodX() is a message.

The question is: The methodX() is a method of ObjA or ObjB ?

Class ObjA{
...
ObjB objB = new ObjB();
objB.methodX();
...
}


or

Class ObjB{
...
ObjA objA = new ObjA();
objA.methodX();
...
}
 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
methodx()is method of object "b"
 
Fernanda Silva
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that this diagram is better (see http://www.zanthan.com/itymbi/archives/000596.html):

The doubt is: The method nextId() is of object Comment or IDGen.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Comment is sending IDGen a nextID message (which in most languages leads to the nextID method on IDGen getting called).
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For grins, here is a little REXX program that draws text sequence diagrams. Post such diagrams between CODE tags to preserve the spacing.
http://www.surfscranton.com/architecture/oochart.rex
I'd be happy to have a Java equivalent (input and output!) if somebody wants to make one for fun.
 
reply
    Bookmark Topic Watch Topic
  • New Topic