Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top