Asked by Nathan Tsung on May 12, 2024
Verified
A mutator method of a class changes the values of the data members of the class.
Mutator Method
A method designed to set or modify the value of an object's instance variable, often referred to as a setter.
- Understand and identify mutator (setter) and accessor (getter) methods in classes.
Verified Answer
FC
Faith ColbertMay 13, 2024
Final Answer :
True
Explanation :
A mutator method is designed to modify the state of an object by changing the values of its data members. Thus, it alters the internal data representation of the object.
Learning Objectives
- Understand and identify mutator (setter) and accessor (getter) methods in classes.