Book a Demo

Author Topic: Class diagram & class constructors  (Read 11654 times)

stabiplan

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Class diagram & class constructors
« on: October 14, 2004, 01:33:32 am »
Hi,

How can I define a constructor in a class in a class diagram? I would expect a property or type for an operation being a constructor (or destructor).

Regards,

Rob

thomaskilian

  • Guest
Re: Class diagram & class constructors
« Reply #1 on: October 14, 2004, 02:49:39 pm »
Why not declaring methods? (In PERL e.g. new() would be the constructor)

stabiplan

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Class diagram & class constructors
« Reply #2 on: October 15, 2004, 01:42:05 am »
Thanks, but I mean a platform independent constructor in UML for a class!

Regards,

Rob

egentz

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Class diagram & class constructors
« Reply #3 on: October 15, 2004, 07:47:32 am »
a method with the name of the class would be the contructor.
or you use stereotype constructor

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Class diagram & class constructors
« Reply #4 on: October 17, 2004, 03:39:42 pm »
20c worth  :)

Suggest #ctor as the stereotype.

Bruce
"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.