Topic
No replies
SystemAdmin
SystemAdmin
1130 Posts
ACCEPTED ANSWER

Re: [uml] Sequence diagram: representing call to method in base class

‏2008-02-28T14:21:19Z  in response to ogeorg
Oliver,
I feel your pain. This gets ugly when the client of the object only knows
about class A and you want to show polymorphism as well as the call to
super.f().
This is sort of a weakness with Sequence Diagrams. If you modeling tool lets
you, you could have two column(object)s with the same object name but
different class names, and stereotype a dependency between them to show that
they are the same object. I have always been frustrated with this aspect of
sequence diagrams.
Scott Fleming
On 2/28/08, uml <disadmin@us.ibm.com> wrote:

Hi,

I am wondering how to represent the following situation:

Class A has a protected method f().

Class B overrides method f(), and the implementation of B.f() makes a call
to A.f() (using super.f())

Would it be correct to represent it as an arrow pointing back to the same
column (object), but with

the method name "super.f()" or "A.f()" ?

Thanks,

Olivier

_______________________________________________
uml mailing list
uml@lists.ca.ibm.com
Unsubscribe:uml-leave@lists.ca.ibm.com

Scott Fleming
Oliver,
I feel your pain. This gets ugly when the client of the object only knows about class A and you want to show polymorphism as well as the call to super.f().
This is sort of a weakness with Sequence Diagrams. If you modeling tool lets you, you could have two column(object)s with the same object name but different class names, and stereotype a dependency between them to show that they are the same object. I have always been frustrated with this aspect of sequence diagrams.

Scott Fleming

 
On 2/28/08, uml <disadmin@us.ibm.com> wrote:
Hi,



I am wondering how to represent the following situation:



Class A has a protected method f().

Class B overrides method f(), and the implementation of B.f() makes a call to A.f() (using super.f())



Would it be correct to represent it as an arrow pointing back to the same column (object), but with

the method name "super.f()" or "A.f()" ?



Thanks,



Olivier

_______________________________________________
uml mailing list
uml@lists.ca.ibm.com
Unsubscribe:uml-leave@lists.ca.ibm.com




--
Scott Fleming
_______________________________________________
uml mailing list
uml@lists.ca.ibm.com
Unsubscribe:uml-leave@lists.ca.ibm.com