File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Question about Sequence Diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Question about Sequence Diagram" Watch "Question about Sequence Diagram" New topic
Author

Question about Sequence Diagram

Fernanda Silva
Greenhorn

Joined: Aug 15, 2003
Posts: 23
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

Joined: Jun 25, 2001
Posts: 208
methodx()is method of object "b"
Fernanda Silva
Greenhorn

Joined: Aug 15, 2003
Posts: 23
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

Joined: Jul 11, 2001
Posts: 14112
Comment is sending IDGen a nextID message (which in most languages leads to the nextID method on IDGen getting called).


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
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.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about Sequence Diagram