PPT Slide
“Accessor” and “Modifier” Methods: “state objects.”
( The identifier name prefix “get” not required, but is preferred practice. )
( The identifier name prefix ‘set” not required, but is preferred practice. )
Allows us to restrict access to variables and thereby control their values. (Otherwise, we would have to include util.ASSERT statements everywhere!)
They can return a variable value, and can return something that is calculated (e.g. getVolume; no need for an iVolume attribute).
They return a value about