Introduction to OOP
Chapter 4: Classes and Methods:
next
previous
audio
real
text
Methods
Although syntax will differ depending upon language, all methods have the following:
A
name
that will be matched to a message to determine when the method should be executed.
A
signature
, which is the combination of return type and argument types. Methods with the same name can be distinguished by different signatures.
a
body
, which is the code that will be executed when the method is invoked in response to a message.
Intro OOP,
Chapter 4
, Slide 16