Home > Getting Started > Creating a First Diagram

Methods

In this section, you will see how to insert new methods in your classes from the class diagram graphical interface.


To create a new method, select New > Method in the class (or interface) contextual menu.


This launches a method creation dialog box. You have to set the method name, return type (with its multiplicity), visibility, parameters, exceptions and modifiers.


For each parameter, you must indicate its name and type.


The parameter type is selected through a class finder.

         


Then you can validate the parameter...



...and the complete method definition.



The method appears immediately in the class. If you click on the method, its code appears in the java editor area.

 

< Previous        Next >