Creating objects

Objects are instances of classes in the model and can be used by any class. You can create objects in object model diagrams and structure diagrams.

About this task

To specify the features for an object, see Specifying features of objects.

In the object model diagram, an object is shown like a class box, with the following differences:

As with classes, you can display the attributes and operations in the object.

Creating objects with the Object tool

Procedure

  1. Click the Object button Object button on Diagram Tools.
  2. Click, or click-and-drag, in the drawing area.
  3. Edit the default name, then press Enter.

    If you specify the name in the format <ObjectName:ClassName> (for an object with explicit type) and the class <ClassName> exists in the model, the new object will reference it. If it does not exist, the product prompts you to create it.

Creating objects with the browser

Procedure

  • Right-click the name of a package and select Add New > Object, or
  • Right-click the Objects category and select Add New Object.

Feedback