Chapter 2 Building an Object-Oriented Model
77
Adding operations to a class
You can add an operation to a class in one of the following two ways:
♦ Add a duplicate operation
♦ Add an operation from a parent class
Adding a duplicate operation to a class
A duplicate operation is an operation that creates and initializes an instance
of a class within the class.
When you create a duplicate operation, it has the name Duplicate, which you
can modify.
You can define only one duplicate operation to any given class.
v To add a duplicate operation to a class:
1 Double-click a class in the model.
2 Click the Operations tab.
3 Click the Add button.
4 Select Duplicate Operation from the dropdown list.
A duplicate operation, the name Duplicate, is created at the end of the
list of operations for the class.