Classes are the core elements in an object-oriented model. They are represented by rectangles divided into three sections that display class information in the topmost portion, attribute information in the second, and operation information on the bottom. These compartments can be hidden via the context menu, as can package and stereotype information.


Every class can have attributes that express some of its properties. In UML, every attribute has a name and a type. The type can be any other DataType, Class or Interface that is in the model. You can select the type from a combo box of all available types. If the type you need is not in the list, you can create it elsewhere, and then select it from the list.

Figure 12-6. Properties of an attribute.

Attribute Properties

Figure 12-7. 'Remove Attributes' setting


Figure 12-8. Properties of an operation.

For every operation, you can set several UML properties. Among them are visibility, scope (class or instance), and concurrency (with designators like sequential, synchronized, and concurrent). You can set an operation to be final, be a query, abstract, or a root method (with no parent).

The two lists on the right of the Properties tab are used to refine the operation's signature. In the list of parameters, the first parameter return is always there. This defines a return type for this operation. Similarly, you can add parameters that may be given a name, a type and the modifier 'final'. The final modifier is a special case that we introduced to handle Java.

You can define a constructor by setting the stereotype <<create>>. The code generation generates a constructor signature.

Operation Properties

Association Classes

Poseidon now supports association classes.

To create an association class:

  1. Create the two classes to be associated.

  2. Select 'Association Class' from the toolbar.

  3. Click on one of the original two classes and drag the mouse to the other class.

  4. An association class will be created between the original two classes.