uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   


Inline Associations

An association represents a relationship between two classes. Associations can be defined within a class, in a similar manner as you would define an attribute.

Contrast this with the same model defined using independently defined associations.


class Group 
  // a many-to-many association
  // An item has zero or more groups and a group has zero or more items
  * -- * Item item;
  // An item has an optional description
  // The association is directed, so descriptions do not know
  // which groups link to them
  1 -> 0..1 Description;

class Item

class Description

Load the above code into UmpleOnline



inlineAssociation : [=modifier:immutable]? [[inlineAssociationEnd]] [=arrow:--
    |-<@>] [[associationEnd]] ;

inlineAssociationEnd : [[multiplicity]] [~roleName]? [[isSorted]]?

associationEnd : [[multiplicity]] [type] [~roleName]? [[isSorted]]?