Book a Demo

Author Topic: Duplication of names for both 'state' and 'method'  (Read 2523 times)

alicecbrown

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • Silence condones.
    • View Profile
Duplication of names for both 'state' and 'method'
« on: February 28, 2007, 06:58:20 am »
 ???  Why, when duplication of names is so dangerous, are we allowed to use the same name for a method as for a state?  And this isn't information hiding at work, since both are public.  Is there a GOOD reason for this?  :-/
Unto him who is given much, much is required.

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Duplication of names for both 'state' and 'met
« Reply #1 on: February 28, 2007, 04:26:03 pm »
Not that i KNOW of.

UML says nothing about a constraint of this type.  In fact, a diagram, an object, it classifier, its attributes and methods and states can all have the same name.

The uniqueness constraint has been explored in these forums before.  There still remains some unquietness in all camps regarding it.

IMO the "real" UML constraint on uniqueness is that any structural element of type "a" in a model having a name "X" refers to a unique entity in the real world.  Thus in a model with 6 diagrams/packages each containing a classifer "XXX", each of these model items is referring to the SAME real world item.

Any further delineation is handled via UML namespacing.

(Note I have succinctly and deliberately avoided ANY comment on packages v namespaces. NFCWBEI)

regards
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.

alicecbrown

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • Silence condones.
    • View Profile
Re: Duplication of names for both 'state' and 'met
« Reply #2 on: March 01, 2007, 05:42:24 am »
Further analysis of the code emerging from this design is called for, to guard against the confusion of identical names.  Hopefully, the programmer did not carry this PERCEIVED problem into the code.
by the way, we do not use EA to generate code, nor do we use the Requirements feature for traceability since we have entirely too much many to one and one to many relationships between requirements and  design.
Unto him who is given much, much is required.