File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about Sequence Diagram

 
Fernanda Silva
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • 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();
...
}
 
Hari babu
Ranch Hand
Posts: 208
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
methodx()is method of object "b"
 
Fernanda Silva
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • 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).
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic