• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about Sequence Diagram

 
Fernanda Silva
Greenhorn
Posts: 23
  • 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();
...
}
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The sequence diagram should show the actual runtime object. It is unclear from your explanation what the runtime instance type is.
 
Fernanda Silva
Greenhorn
Posts: 23
  • 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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!