A class is shown as a box with a title (the name of the class) and an optional list of local attributes, operations and classes. The two class symbols shown below are actually two different views on the same class (Reservation). The left symbol showing only the names of the attributes and the right symbol showing full type information of the attributes. In the following examples one or the other view will be used depending on the illustrative purposes of the example.
Aggregation is shown as a line connecting two class symbols. A diamond is attached to one end of the line. The diamond is attached to the class that is the aggregate.
Multiplicities are shown at each end of the aggregation. Multiplicities may either by an integer value or an integer interval on the form lower-bound...upper-bound. In addition, the star character (*) may be used for upper-bound, denoting an unlimited upper bound. In the above example the multiplicities mean that an office may contain zero or more letters.
The diamond attached to the aggregate may either be hollow or filled. If it is hollow the implementation of the aggregation is said to be by-reference and if it is filled it is said to be by-value. The first case corresponds to reference composition in BETA, the second to whole-part composition.
Specialization is illustrated as a tree of class symbols. A line is drawn between the subclass and the superclass with an arrow at the end connected to the superclass.
An association is shown as a line connecting two class symbols.
Multiplicities are shown on each end of the association. The syntax of the multiplicities on associations is exactly the same as the syntax of the multiplicities on aggregations. In the above example the multiplicities mean that a company may be associated to zero or more persons through the relation works-for and a person is related to exactly one company (i.e. in this example a person may not have more than one employer).
Apart from multiplicities role names may be attached to each end of the association. A role name indicates the role played by the class attached to the end of the line near the role. For instance in the above example the role of a company seen from the view of a person is an employer (and vice versa).
Finally the association may be given a name. In the above example the name of the association is WorksFor.
Mjolner Integrated Development Tool - Tutorial | © 1991-2002 Mjølner Informatics |
[Modified: Friday October 27th 2000 at 14:56]
|