Book a Demo

Author Topic: Interacting with a Base Class  (Read 3823 times)

TrtnJohn

  • EA User
  • **
  • Posts: 176
  • Karma: +0/-0
    • View Profile
Interacting with a Base Class
« on: December 09, 2005, 08:12:03 am »
What is the best way, using a sequence diagram, to show how overrided members interact between the derived class and the base class.  Since the 2 classes are still only a single instance should there only be one lifeline??

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Interacting with a Base Class
« Reply #1 on: December 11, 2005, 02:53:37 pm »
Self-calls???


























ObjX------------------------>MyObject:
MyParent
        |                 |---------
        |         ||base.overriddenMethod()
        |         |<---------


Not that thats very clear though.

bruce

Perhaps a <<virtual>> object for the base? Any takers?
« Last Edit: December 11, 2005, 02:55:32 pm by sargasso »
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

TrtnJohn

  • EA User
  • **
  • Posts: 176
  • Karma: +0/-0
    • View Profile
Re: Interacting with a Base Class
« Reply #2 on: December 12, 2005, 01:47:52 pm »
I also noticed when I drag a class onto a sequence diagram that one of the options is to drop it "As New Child (Generalization)".  This almost sounds like what I may want to do.  But this menu option is always grayed out when I try to drop the class on a sequence diagrams.  ANyone know what this option is for or how to use it?