Each attribute follows a certain syntax which is built up using the following structure:

  1. Visibility: who is permitted to access the attribute
    • +: public / everyone
    • -: private / only the object itself
    • #: protected / class itself and sub-classes
    • ~: package / classes that are in the same package
  2. Derived: / is specified if the attribute value is derived from other attributes
  3. Name: name of the attribute
  4. Type: it may be one of:
    • Another user-defined class
    • Predefined primitive data type (Boolean, Integer, String)
    • User-defined primitive data type: «primitive»
      	graph {
      		node[shape=record]
      		Float [label=<{«primitive» <br align="center"/><b>Float</b> <br align="center"/>| round(): void<br align="left"/>}>]
      	}
    • Composite data type: «datatype»
      	graph {
      		node[shape=record]
      		Float [label=<{«datatype» <br align="center"/><b>Date</b> <br align="center"/>| day<br align="left"/>month<br align="left"/>year<br align="left"/>}>]
      	}
    • Enumeration: «enumeration»
      	graph {
      		node[shape=record]
      		Float [label=<{«enumeration» <br align="center"/><b>AcademicDegree</b> <br align="center"/>| bachelor<br align="left"/>master<br align="left"/>phd<br align="left"/>}>]
      	}
  5. Multiplicity: number of values an attribute may contain
    • By default, we take it to be .
    • Notation is .
    • No upper limit may be indicated by or .
  6. Default value: used if the attribute value is not set explicitly by the user
  7. Properties: additional restrictions on attributes
    • Predefined properties that may be used:
      • {readOnly}: value cannot be changed
      • {unique}: no duplicates permitted
      • {non-unique}: duplicated permitted
      • {ordered}: fixed order of the values
      • {unordered}: no fixed order of the values
    • Common attribute specifications:
      • Set: {unordered, unique}
      • Multi-set: {unordered, non-unique}
      • Ordered set: {ordered, unique}
      • List: {ordered, non-unique}