Book a Demo

Author Topic: n-ary association class  (Read 5034 times)

confucius

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
n-ary association class
« on: January 11, 2007, 03:47:32 am »
Hello all,

How can I define graphically an association class for an n-ary association ? The dotted line is expected to connect the association class to the diamond shape representing the n-ary association. Even how hard I try ( :D) the source and destination ends of the dotted line still continue to connect the association class (correct) to one of the link between the diamond and one of the classes participating in the n-ary association, which is incorrect.  

thanx.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: n-ary association class
« Reply #1 on: January 11, 2007, 04:15:13 am »
Can you post a diagram fragment to illustrate your problem?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

confucius

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: n-ary association class
« Reply #2 on: January 11, 2007, 05:53:33 am »
Paolo,

An example of what I am trying to do is at http://www.jot.fm/issues/issue_2006_07/article5 (figure 1(a)) (the Supply association class describing the 3-ary association between Vendor, Project and Part).

thanx.

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: n-ary association class
« Reply #3 on: January 11, 2007, 06:41:21 am »
Hi confucius,
I know that it makes another self-association on the diamond-association with the associated class.

Does not look exactly like your picture, but the meaning is clear.
See picture.
Jan 'Bary' Glas

confucius

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: n-ary association class
« Reply #4 on: January 11, 2007, 07:40:20 am »
Hi Jan,

That's a good hack, event if not UML compliant  :-/ I had expected EA to be more "friendly" on that one.

thanx.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: n-ary association class
« Reply #5 on: January 11, 2007, 01:51:54 pm »
As far as the visual goes, try a dependency with unspecified direction.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: n-ary association class
« Reply #6 on: January 11, 2007, 02:02:30 pm »
Whatever you decide won't affect code generation, so you're free to choose whatever notation you like best. I would simply attach the class to one of the association connectors in the normal manner.
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: n-ary association class
« Reply #7 on: January 11, 2007, 02:03:28 pm »
If you search for the term n-ary (posted by PaoloFCantoni) you'll see a contrary view on how to represent the n-ary relation - to that represented in the JOT article (which I think looks, superfically, clumsy).

(I'll read the article more closely and provide a more formal response).

In particular the diagram in the article: [size=13]Navigability[/size] illustrates my thoughts.

Other entries (found by the search) will also show how to use Inversion of Control (IOC) to implement the n-ary Association so represented in code.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!