Book a Demo

Author Topic: Assigning existing class as Association Class  (Read 3738 times)

iain

  • Guest
Assigning existing class as Association Class
« on: January 20, 2003, 07:03:48 am »
Is it possible to assign an existing class to an association (Association Class). I have the situation where I have a common class which I want to use for more than one association - unfortunately I don't seem to be able to associate this class to the associations in my model.

Creating an association class creates a new class and you cannot assign the type to an existing class.

Ilja Kraval

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Assigning existing class as Association Class
« Reply #1 on: January 20, 2003, 10:43:32 pm »
Hi iain,

I think Your approach is not correct. Association Class is Association and Class together (in UML). Association must have two or more Association Ends with Classes, that is, Association Class has one or more declared Classes on ends. That is, Association Class connects two or more declared (strictly determined which) Classes and You cannot use the same Association Class for another connecting of another Classes. This Classes on ends You cannot "assign" to another Association...
I think, solution is making more Association Classes and then using interaction between them, for instance Inheritance or Aggregation between them (if they have anything as "common properties - attr. or operations"). That is, not use only one Associtaion Class, but more of them, and "re-use them" by Interaction between classes (which Interaction to use depends on nature of their relation).

Ilja Kraval
RNDr. Ilja Kraval,
Object Consulting,
Czech Republic