Page-3 [Back][Next] up.gif (995 bytes)

The state of an object - information that can be associated with it at any given point in time - is modeled by a static model on a type that describes that object. The static model consists of a set of attributes - properties that define information on the state of the object at any point in time; and a set of static invariants - rules on what combinations of attribute values are valid for that object's state to be valid.

For example, the static model of an Order may include attributes for a set of LineItems (each, in turn, for some quantity of a  product), the orderTotal, and the Customer. The static invariants on Order may include rules like "no two LineItems can be for the same Product", or "the orderTotal cannot be greater than the customer's credit limit".

A convenience attribute is one which is introduced purely for convenience; you could describe things without it by referring to some more basic attributes, but it simplifies what you need to say and may provide some de-coupling from the more detailed attributes. A convenience attribute must have a static invariant that defines its value in terms of other attributes.

For example, you may not strictly need to define orderTotal as an attribute, since you could simply refer to the quantity of each of its line items, and the unit price of the corresponding product, with equivalent effect. However, introducing orderTotal simplifies your descriptions of other activities such as invoicing and payment,  de-couples those descriptions from changes in the way the order total is determined, and reduces duplication. We would need to add a static invariant which said: the orderTotal is the same as the sum of each LineItem's quantity times that product's unit price.

An association graphically depicts an inverse pair of attributes. A state, in a state chart, is a graphical way of introducing an attribute which is either true or false. The structure of states in a state chart defines static invariants (exclusion, inclusion) between the corresponding states.

For example, the customer attribute of an Order, and the setOfOrders attribute of a Customer could be defined as a single association between the two object types. A state chart of Order may show states of pending, fulfilled, invoiced, and paid; and it becomes valid to then refer to is this order pending? i.e. these states can be treated as boolean attributes.

A snapshot shows a set of objects and their configuration at a point in time (the values of their attributes or links to other objects).

A filmstrip shows a sequence of snapshots evolving through the steps of a scenario.