How to overload operations in class model

Overloading methods is a very important technique in object-oriented modeling. It offer the ability to create multiple operations of same name with different implementations. In Visual Paradigm you can overload the operations simply from its specification dialog. To overload the operation:

  1. Right click on a class and select Open Specification from the popup menu.

    Open specification dialog of the class

    Open specification dialog of the class

  2. Switch to Operations tab and select the operation which you wish to overload.

    Select operation to overload

    Select operation to overload

  3. Press the Overload button, and a new Operation Specification dialog will be showing.

    Overload the operation

    Overload the operation

  4. You can now define the specification of the overloading operation, such as changing the parameter types.

    Define the details of the overloading operation such as adding new parameter

    Define the details of the overloading operation such as adding new parameter

  5. When finish, press OK to close the Operation Specification dialog, and the overloading operation will be showing in both the specification dialog of the class as well as in diagram.

    The operation being overloaded

    The operation being overloaded

Related Know-how

Related Link

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply