An attribute holds a property of an object (either one per instance, for example the Accession Number of a Book in a Library, or per class, for example the next Accession Number to be used).
Instances of a Class must be uniquely identifiable by some attribute or combination of attributes. For example, a Vehicle Excise Disk (a UK thing, up until October 2014: the circular document you displayed on your car's windscreen to show you'd paid the annual road tax) might be identified by the combination of Vehicle Index Mark (the licence plate number) and Validity Start Date. Vehicle Index Mark and Validity Start Date then become "identifying attributes", whereas Date Of Issue and Period Of Validity are just common-or-garden attributes.
In ColdFrame, you must not specify identifiers for
All other classes must have identifiers. In this, ColdFrame doesn't follow Executable UML; it seems risky to apply too many defaults.
For the case where there's no suitable naming attribute, ColdFrame provides the attribute type Autonumber (rather like the Microsoft Access feature it's named after): each newly-created instance gets a new value.
If a «datatype» class has attributes, it corresponds to a C struct or an Ada record.
Attributes are, of course, modelled as attributes of a UML class.
In UML, an attribute is expressed as
«stereotype» visibility name [multiplicity] : type-expression = initial-value {property-string}
where the red parts are mandatory.
ColdFrame doesn't support multiplicity; you'll either need to use array types (not yet implemented with ArgoUML) or an association.
The property-string (a tagged value) isn't supported.
Attributes of classes can be class attributes, ie there is a single value shared by all instances. Indicate this by checking the ownerScope checkbox in the modifiers section of the ArgoUML Properties tab.
«id» Number : Positive «id» Issuing_Office : Licensing_Office {formalizes=R8}
Attributes of types are implemented as Ada record components.
Ordinary attributes of classes are implemented in the "instance record", accessed as This.attribute-name.
Class attributes are implemented as variables in the private part of the class package, and are accessed directly by name.