Johan
Johan

Reputation: 3819

Meaning of association in a UML class diagram

enter image description here

0...1 next to Plane class means that an instance of Flight is associated with either none or one instance of Plane. But Flight class has no attribute member of type Plane.

So where will such association Flight-->Plan be seen in the system? What does it mean exactly "being associated" in a UML class diagram?

Upvotes: 3

Views: 1348

Answers (2)

Gangnus
Gangnus

Reputation: 24464

Associations with dot on the end, according to the UML standard (B3.2 section), could mean that they are attributes.

Associations with usual arrows or without them, mean only existing NAVIGATION from one class to another. That can mean, if class A has association to B, that:

  1. A has B instance as a property.
  2. A has instance B as a local variable.
  3. A has some reference (to reference...) to some instance to B and USES it (having simply reference to some class C that has association to B is not enough)
  4. A has a method returning B instance.
  5. There could be a collection or array of B instances instead of a single B instance.
  6. A has some of the previous navigable ways to B, but we don't specify which of them. (unspecified navigation)

The last edition of the 2.5 standard gives several ways to set the rules for showing arrows and crosses on the ends of an association (11.5.5), but never can it be limited to properties only.

Read the standard, no blogs. Internet folklore knowledge on the UML is very, very poor.

Upvotes: 2

qwerty_so
qwerty_so

Reputation: 36295

I would simply link to JimL's answer here, which links to Geert's blog. In short: associations ARE the attributes. They are just a different (better) rendering of the same thing.

In your example the two assign* association end names are properties in the opposing class.

Upvotes: 3

Related Questions