Introduction to OOP Chapter 4: Classes and Methods: next previous audio real text

Setters (or mutators)

A setter (sometimes called a mutator method) is a method that is used to change the state of an object:

class PlayingCard {

		// operations on a playing card
	public void    setFaceUp (boolean up) { faceUp = up; }
		...
		// private data values
	private boolean faceUp;
}

Mutators are less common than accessors, but reasons for using are similar.
Intro OOP, Chapter 4, Slide 21