0

In ArgoUML, I have the ability to put a class Type to any property of a class. For example, I can declare a customer property with a Customer type in the Order class. I can also easily draw a relationship from class to class:

Class diagram

But I can't figure out how to "draw" the link from the customer property to the Customer class. The link is never really connected to the property, but rather to the entire Order class.

I can move the position of the link manually:

enter image description here

But it's never really "locked" to the customer property, and can be moved automatically by the software at any moment.

Is there a way to do this?

3 Answers 3

1

You can not have an association in UML which is not connecting the entire two classes. It is not possible to touch the property inside the class. Workarounds are:

  • add a note linked to the property
  • add an icon to the property which would be designed like an association.

I don't know if this advanced icons customization is available in this free tool but it is in other tools.

2
  • Thank you, I thought this was a limitation of the software, and not of UML itself. Would you know any alternative to UML capable of this?
    – BenMorel
    May 20, 2011 at 13:41
  • No I don't but I don't think that an association link to the attribute and not the class is the best. For example if you don an association between two classes the attributes contains the association property already. So why to stick a link ?
    – UML GURU
    May 22, 2011 at 11:22
1

I found a flash demo which shows the association attribute with an icon. Look at : http://www.download-omondo.com/show_association_member.swf

If you need to understand what mean an association in UML and code generation in Java then have a look at this demo: http://www.download-omondo.com/association.swf

Hope this help.

1
  • Thanks, actually I was not using ArgoUML for code generation purposes, but as a drawing tool for relationships between my classes!
    – BenMorel
    May 22, 2011 at 23:47
0

ArgoUML follows the UML specification. Associations are drawn from one class to another. Attributes are drawn inside the 2nd compartment of a class.

The association type closest in meaning to an attribute is composition, but they are not equivalent.

You should never portray something AND as an attribute of a class, AND as a separate class associated to it.

E.g. 1. an Order may have a Number, that may be used by the customer to identify his Order. The Number is best portrayed as an attribute (in the 2nd compartment of the class).

E.g. 2. an Order may be associated to the Customer who placed the order. The Customer is best portrayed as a separate class, since it has its own lifespan (behavior), associated with the Order. This allows to show multiplicities and roles at both ends of the association line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.