Book a Demo

Author Topic: attributes and operations of n-array association  (Read 4508 times)

Elham

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
attributes and operations of n-array association
« on: January 28, 2009, 06:08:34 pm »
Hi
Association class is just available for association between 2 class. In n-array association when we use diamond symbol, this diamond can’t have any attributes or operations. How can I model attributes and operations of n-array association?

Thanks alot

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: attributes and operations of n-array associati
« Reply #1 on: January 28, 2009, 10:32:34 pm »
Right-click the association (I think) and use the context menu to add additional elements.
No, you can't have it!

Elham

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: attributes and operations of n-array associati
« Reply #2 on: January 28, 2009, 11:32:15 pm »
Quote
Right-click the association (I think) and use the context menu to add additional elements.

Righ-Click on Diamond simbol? Nothing special.!
But in context menu of association(Diamond simbol), There is
Advanced=>Convert to instance.
Now when you right click on Dimond simbol again ,ATTRIBUtE is appear!, but it doesn't work!
« Last Edit: January 28, 2009, 11:34:01 pm by Elham »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: attributes and operations of n-array associati
« Reply #3 on: January 29, 2009, 05:17:33 am »
Sorry Elham, I steered you wrong,

Well, I did say "I think" in brackets.

It works the other way around. You add the element to the association from the element side.

In the EA help index look up Association Class | Link New Class to Association. [Note that I use the "|" character to separate the different levels within the index. Do not go to the Association | Class entry, it does not provide or link to the information you need.]

Sorry about getting it wrong the first time. I needed to dash out into the snow in a hurry, and did not have time to look it up for you.

David
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: attributes and operations of n-array associati
« Reply #4 on: January 29, 2009, 08:27:26 am »
EA doesn't allow attaching an association class to an association diamond.

The workaround to this is attaching it to one of the associations EA uses on the to connect the diamond up to each class.

Elham

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: attributes and operations of n-array associati
« Reply #5 on: February 01, 2009, 06:35:07 pm »
Thanks Simon
but how can I attach a class to association?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: attributes and operations of n-array associati
« Reply #6 on: February 02, 2009, 08:33:01 am »
If you right click on a class you would like to attach, you can select Advanced | Association Class.  You can then choose from all the associations on the diagram.

Elham

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: attributes and operations of n-array associati
« Reply #7 on: February 02, 2009, 04:32:35 pm »
Quote
If you right click on a class you would like to attach, you can select Advanced | Association Class.  You can then choose from all the associations on the diagram.
It's not possible.You can choose just one association.
I solved my problem in another way, I use a class instead of n-array association, and this class (instead of Dimaond) associate with others.
« Last Edit: February 02, 2009, 04:36:48 pm by Elham »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: attributes and operations of n-array associati
« Reply #8 on: February 02, 2009, 04:41:12 pm »
Quote
It's not possible.You can choose just one association.
You only need to choose one because all the edges that take part in an n-ary association are part of the same association.
The Sparx Team
[email protected]

Elham

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: attributes and operations of n-array associati
« Reply #9 on: February 04, 2009, 07:45:14 pm »
Thanks
And in transfer to Data model,Does it transfer correct?

But I solved my problem in another way.I defined a stereotype for class "AssociationClass".And I use this class instead of Diamond.Is it right?

« Last Edit: February 04, 2009, 07:46:39 pm by Elham »