[Uml-devel] Bug or feature? Cant have same class appear more
Brian Thomas
thomas at mail630.gsfc.nasa.gov
Thu May 15 09:48:19 UTC 2003
On Thursday 15 May 2003 09:07 am, JR wrote:
> > Comments? I guess I lean towards removing this limitation in
> > Umbrello if its not too hairy. I dont see any problem with UML rules as
> > to why this cant happen.
>
> I /think/ that UML does not allow classes to appear more than once in any
> one diagram. But it does allow class instances (i.e. objects) to appear
> in class diagrams as many times as you want, something Umbrello does not
> currently allow for. Could be this is something that should be allowed
> for. Not sure how it would affect code generation though.
Well, in my example, these arent particular instances of a class.
_Every_ instance would have these associations/attributes,
e.g. the code (Java) is:
class Sentence () {
private Topic subject;
private Topic predicate;
public Topic getSubject () { return subject; }
....
}
Obviously, I could have simply created my class to have attributes
"subject" and "predicate" with type "Topic", but associations should
be possible to model this too, no? I consider it good form to use
associations to model the relationship between a class and other
classes, in particular, lists of objects (classes). I dont like seeing stuff
in attributes like:
myAttribute <Qlist Topic> subjects
But Im no UML expert. Perhaps this reciprocation between associations
and attributes IS strickly limited. "Seems" wrong to me if that is so.
=b.t.
--
If you _really_ feel this strongly about the bug, you could
either try to increase the number of hours a day for all of
us or you could talk to my boss about hiring me as a consultant
to fix the problem for you on an emergency basis :)
- Rik van Riel explaining what to do against kernel bugs
More information about the umbrello-devel
mailing list