UML Distilled: A Brief Guide to the Standard Object Modeling Language, Second Edition
by Martin Fowler, Kendall Scott
Attributes
Attributes are very similar to associations.
At the conceptual level, a Customer's name attribute indicates that Customers have names. At the specification level, this attribute indicates that a Customer object can tell you its name and has a way of setting a name. At the implementation level, a Customer has a field (also called an instance variable or a data member) for its name.
Depending on the detail in the diagram, the notation for an attribute can show the attribute's name, type, and default value. The UML syntax is visibility name: type = defaultValue, where visibility is the same as for operations, described in the next section.
So what is the difference between an attribute and an association?
From the conceptual perspective, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access