Match accessor and mutator vocabulary

Each term below describes part of how a class lets other code read and update its stored values. Match every term with the description of its role in a getter or setter.

Match each term
A.

A reference to the current object, used to name a field when a local variable has the same name

B.

A check inside a setter that refuses or adjusts a value outside the allowed range

C.

A method that changes the stored value of a field, often after checking the request

D.

Marks a method that sends nothing back to its caller, common for setters

E.

A method that returns the stored value of a field and leaves the object unchanged

F.

The local variable that receives the value a caller passes into a method

void return type

Validation

this

Accessor

Mutator

Parameter

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Accessors and Mutators Questions: