232: Highlights
Getter and setter instance methods provide an indirect route to instance-variable access and assignment.
You can define getter and setter instance methods for imaginary instance variables.
If
you want to refer to an instance-variable value using a getter,
then
instantiate the following pattern:
instance
.
getter method
()
If
you want to assign an instance-variable value using a setter,
then
instantiate the following pattern:
instance
.
setter method
(
new-value expression
)