Book a Demo

Author Topic: Generalization of Associations  (Read 3691 times)

peter

  • Guest
Generalization of Associations
« on: July 19, 2004, 06:49:09 am »
Hello,

I'm wondering if there is a way to show generalization
of an association.
This means is there a way to draw the "Generalize-Arrow" between to association elements?
If the answere is NO, what do you think is the prefered way to show this fact in the diagram ?
Currently I add a constraint {redefines super_assoc }
where "super_assoc" is the name of the association to inherit from.
Also I didn't found a way to mark an association as derived, so I added the slash to the associations' name :-(
Did I overlook something ?

Any hint will be highly appreciated, thanx
peter

Barry_Pearce

  • EA User
  • **
  • Posts: 70
  • Karma: +0/-0
    • View Profile
Re: Generalization of Associations
« Reply #1 on: July 22, 2004, 04:25:04 am »
?? I didnt even understand the concept....

Can you explain in other words what you are trying to express....
cheers.

Takeshi K

  • EA User
  • **
  • Posts: 630
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Re: Generalization of Associations
« Reply #2 on: July 22, 2004, 05:26:38 pm »
Hello Peter,

Now EA doesn't have a feature to show generalization
of an association.
(This notation is defined in UML 1.5)

I tried to show the relation, but coundn't find
good way to show it.

--
t-kouno
--
t-kouno

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Generalization of Associations
« Reply #3 on: July 22, 2004, 07:13:50 pm »
Quote
I'm wondering if there is a way to show generalization
of an association.


Hi there,

Is this what you need?

The Sparx Team
[email protected]

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Generalization of Associations
« Reply #4 on: July 22, 2004, 07:57:16 pm »
Now that t-kouno has given me a place to find out about these (although I still think they be closely related to leprechauns) I am even less sure that you need them....
Quote
Association is a GeneralizableElement. The following elements are inherited by a child
Association.
connection The child must have the same number of ends as the parent. Each
participant class must be a descendant of the participant class in the same
position in the parent
. If the Association is an AssociationClass, its class
properties (attributes, operations, etc.) are inherited. Various other
properties are subject to change in the child. This specification is likely to
be further clarified in UML 2.0.


So...

Kp's model should include generalisations between class3 and 1 and also between class 4 and 2.  Given that, what need is there to show a generalisation of the association.

and I'm still with Barry here  - what the ... does a generalised association mean?

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.

Molto Mike

  • EA User
  • **
  • Posts: 66
  • Karma: +0/-0
    • View Profile
Re: Generalization of Associations
« Reply #5 on: July 22, 2004, 11:44:32 pm »
Hi,

I think those generalized assocs *are* required. An example (sorry, can't draw up a diagram right now...):

class Component;
class Port;

Component aggregates Ports as "ports"; // rolename

class Composition extends Component; // hierarchical component
class DelegationPort extends Port;

Composition aggregates DelegationPorts as "/delegationPorts";

Obviously, the aggregation from Component to Port is refined by the aggregation from Composition to DelegationPort.

Tool support to formally show this in the model without changing the name of the role (Adding the slash) would be great, since currently, code generation creates two aggregations, while the model in fact only has one (described on two different abstraction levels).

Mike

peter

  • Guest
Re: Generalization of Associations
« Reply #6 on: July 26, 2004, 08:23:14 am »
Hello,

thanx so far for your ideas and infos.
The example with diamonds may be a solution.

cheers
peter