Rack Cloud
Rack Cloud

Reputation: 37

UML Class diagram: What is the meaning of attributes at lines?

Hello stackoverflow community:

I have never seen attributes at lines before. So could someone explain me where these have to be defined?

Usually we have attributes in the classes at the second row. So I am confuded about this notation. enter image description here

Upvotes: 2

Views: 154

Answers (1)

Christophe
Christophe

Reputation: 73406

These are not "attributes", but these are association end names, which are also called "roles". It means the same as if the class And would have two properties mlhs and mrhs referring each to an Expression type. It also means that class Not would have an mexpr property.

By the way:

  • the roles should be placed closer to the end of the association, at the side of interface. Otherwise they could be confused with the association name, which is yet something else.
  • the aggregation diamond does not add any value in this model.
  • lastly, you could replace the open arrow at the end of the association, which express navigability, with the dot notation which expresses ownership of the association-end and implies navigability.

Upvotes: 2

Related Questions