method

The name given in Smalltalk and other object-oriented languages to a procedure or routine associated with one or more classes. An object of a certain class knows how to perform actions, e.g. printing itself or creating a new instance of itself, rather than the function (e.g. printing) knowing how to handle different types of object.

Different classes may define methods with the same name (i.e. methods may be polymorphic). The term "method" is used both for a named operation, e.g. "PRINT" and also for the code which a specific class provides to perform that operation.

In Smalltalk, a method is defined by giving its name, documentation, temporary local variables and a sequence of expressions separated by "."s.