next up previous contents
Next: Commentary: Operations Up: Lecture 2: Classes, Objects, Previous: Commentary: Class Name

Commentary: Class Attributes

Describes object characteristics. Determined by system requirements. Types must be specified whether primitive or class. Visibility may be given (+: public, -: private, #: protected) or assumed public when not shown. Attribute values are assigned at object creation. Every class scope attribute (static in Java) has the same value for all the objects of the class; shown underlined in the diagram. Enumeration type is shown by a property-string: {..,..}. Syntax for attribute:

visibility name: type-expression = initial-value {property-string}

Property-string is used to show the persistence of the attribute. Attributes are elided if not needed for the particular context.



Ananda Amatya
11/3/1999