Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Content layer
id1398569290
Content column
id1398569292
Content block
id1398569291

This example shows the Class myClass that has Operation myClass(), which is the constructor, and Operation ~myClass(), which is the destructor. 

Example Constructor and Destructor in the Class diagram

The Constructor and the Destructor operations. 

To create a Constructor



  1. Create a Class with an Operation.
  2. Go to the Class Specification window.
  3. Select Operation
  4. Apply the stereotype «C++Constructor» for Operation.


To create a Destructor



  1. Create a Class with an Operation.
  2. Go to the Class Specification window.
  3. Select Operation
  4. Apply the stereotype «C++Destructor» for Operation.




Content block
id1398569289

Related Pages:

Children Display
pageConversion from an Earlier Project Version

Children Display
pageCode Engineering