Jump to user comments
programming The name given in
Smalltalk and other
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 tha
t operation.
Most methods operate on objects that are instances of a
certain class. Some object-oriented languages call these
In
Smalltalk, a method is defined by giving its name,
documentation, temporary local variables and a sequence of
expressions separated by "."s.
(2000-03-22)