MSc-IT Study Material
January 2011 Edition

Computer Science Department, University of Cape Town
| MIT Notes Home | Edition Home |

Constraints and notes

Notes

As in use case modelling, it is often very helpful to be able to annotate a diagram to show particular features. The notation is exactly the same:

Figure 5.8. The notation for notes

The notation for notes

You can, and should, apply notes wherever you think they will be helpful to the reader, but they should not be viewed as a substitute for proper documentation. A class model is not complete until all classes, attributes, operations, and associations, have been documented. Notes are useful for pointing out specific details on diagrams.

Constraints

Constraints are additional information about a class that are not associated with any particular attribute or operation. A typical constraint might say, for example, that one attribute will have a value which depends on some other attribute. It is customary to write simple constraints below the class in braces, {like this}.

Constraints are becoming increasingly important in object-oriented modelling, as there is an increasing interest in formalising the technique. A scheme called the object constraint language is under development to support formalised constraints, but this is beyond the scope of this course.