[BNM] representing an OR aggregate/composite relation in UML class diagrams
Jon Bedworth
jon.bedworth at gmail.com
Mon Aug 11 14:58:48 BST 2008
Hi
> In the example they show, I'd probably go for a subclass (as they show on
> the other side of the diagram). And probably end up with a 'line-item'
> interface implemented by any item that can be put on a line.
Yes, I'd normally do that, but the issue arose because I was initially
trying to say that
the exclusive OR relates to two different types of object (which were
not related in a type hierarchy).
One type of object could contain further instances of objects of the
same type, or other kinds
of object not related to it.
But then again, I suppose I could just create a more general abstract
type which serves as a general
type that relates these different type of objecct at a higher level,
and use that instead of
the contraint approach.
> This (of course) assumes that you are coding from your digrams, rather than
> using them for higher level problem domain mapping.
Yes, this was more a higher level description than a diagram for
direct use in programming.
> Paul /)/+)
Thanks for your thoughts.
More information about the BNMlist
mailing list. Powered by Wessex Networks