
Creating and Defining Methods
Methods describe how an object behaves. You implement them using functions defined within classes. They are operations that change the attributes of a class or interface. There are instance- and static methods. Instance methods refer to a certain class instance, whereas static methods are common to all the class instances. Static methods can only address static attributes.
The special methods include constructors and class constructors. Constructors (class constructors) need not be created explicitly if they are not to be implemented.
Prerequisites
You must already have created the class or interface. It is useful if you have already created the attributes of the class, since you can branch directly from a method definition in the Class Builder to its implementation.
Procedure
To create methods for classes and interfaces:


Result
You have now created methods for an object type. These are included in the definition part of the class or interface, that is, generated into the corresponding class pool or interface pool.
Before you can implement the methods, you must create your parameters and exceptions.
See also:
Creating Parameters and Exceptions Implementing Methods Creating Event Handler Methods