An attribute is the abstraction of a single characteristic possessed by all the entities that were, themselves, abstracted as a Class. – Executable UML, Mellor/Balcer
xUML uses the definition from Executable UML: A Foundation for Model Driven Architecture, Addison-Wesley 2002 above.
The complete set of Attributes in a Class should be meaningful for all instances of that Class. This means that each instance of a Class should provide a value for each of its Attributes under all circumstances. The non-value ‘not applicable’ may never be used.
That said, there is a bit of an exception to this rule in the case of a Referential Attribute that refers to a 0..1 / 1c / one-conditional side of an Association. In this case, the Referential Attribute may be assigned the special value ‘none’ to indicate that no link is present at the moment. Note the difference with ‘not applicable’ in that the Referential Attribute is still applicable, but is not linked at the moment. It is similar in the sense that conditional references yield conditional logic (if the link is there, do this, if not do that) which is nice to avoid when possible for the same reason ‘not applicable’ is bad.
This is a descriptive name that appears inside the topmost compartment of a UML class symbol on a class diagram. It is also referenced throughout the other model types, particularly inside activities.
- Name + Class + Domain
No two Attributes share the same name within a Class.
Attribute characterizes exactly one Class Class is characterized by one or many Attribute
An Attribute expresses a characteristic that describes all potential instances of a Class.
Since a Class must have at least one Identifier, and an Identifier consists of at least one Attribute, it follows that a Class requires at least one Attribute.
An Attribute may not be defined outside of the context of a Class.
Attribute is a Non-Referential Attribute or a Referential Attribute
An Attribute either refers to an Identifier Attribute in another Class or it does not. If it does, it is a Referential Attribute. Otherwise, it is a Non-Referential Attribute.