Book a Demo

Author Topic: dashed line in Assoc. Class  (Read 5948 times)

Ilja Kraval

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
dashed line in Assoc. Class
« on: July 19, 2003, 12:10:55 am »
He all,

UML 1.4. chapter 3.47.5. says:  

A diamond attached to some number of class symbols by solid lines maps into an N-ary
Association whose AssociationEnds are attached to the corresponding Classes. ... If a
class box is attached to the diamond by a dashed line, then the corresponding Classifier
supplies the classifier properties for an N-ary AssociationClass.


And picture 3.44 shows example.  

How can I introduce N-ary AssociationClass? I cannot find this attaching of dashed line in EA 3.51 to diamond. It is the same attaching as dashed line in modeling with Association Class to line of Association.

Thanks for advice.
RNDr. Ilja Kraval,
Object Consulting,
Czech Republic

Javier

  • EA User
  • **
  • Posts: 67
  • Karma: +0/-0
  • Necessity is the mother of email
    • View Profile
Re: dashed line in Assoc. Class
« Reply #1 on: July 30, 2003, 10:15:18 am »
Ilja,

If I'm understanding correctly, what you need to do is this:

1. Create a new diagram and create two classes: Class1 and Class2.

2. Select the Association Class icon and drag it from Class1 to Class2.

At this point, EA creates an association class between Class1 and Class2.  You can then rework the main association--aggregation, multiplicity, etc.--to make it reflect your "diamond" question :-)


Regards,

Javier
We must become the change we want to see.
- Ghandi

Ilja Kraval

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: dashed line in Assoc. Class
« Reply #2 on: July 30, 2003, 12:25:21 pm »
Hi Javier,

thanks for Your answer, but it is not my problem. I know about this possibility for 2 classes and it is possible to make assoc class for 2 classes in EA.

But what about 3 and more classes and N-ary assoc class - not only 2 but more! It is situation in chapter 3.47.5 in UML1.4. and picture 3.44

Example in IS of High school: Subject, Teacher, Room and association class Examination with attributes Day and Time. Examination is assoc. class for 3 classes (joins one Subject and one Teacher and one Room together) , and not  for 2 classes. Diamond is joining together 3 classes and with dashed line the fourth - class Examination...








« Last Edit: July 30, 2003, 12:28:20 pm by Ilja »
RNDr. Ilja Kraval,
Object Consulting,
Czech Republic

Javier

  • EA User
  • **
  • Posts: 67
  • Karma: +0/-0
  • Necessity is the mother of email
    • View Profile
Re: dashed line in Assoc. Class
« Reply #3 on: July 30, 2003, 03:12:47 pm »
Got it.

OK, here's what you do.  

1. Create the class diagram, Create the 3 classes that you want and associate them using the n-ary association (say, Subject, Teacher, Room) (the icon with a diamond, bottom of the toolbar)

2. Create the association class (say, Examination)

3. Create a regular dependency association between the n-ary association and the association class.  Almost there.

4. Modify the dependency Direction (navigability) to Unspecified.

Regards,

Javier
We must become the change we want to see.
- Ghandi