which is true? group of answer choices private members can be accessed by a class user a mutator is also known as a getter method a mutator may change class fields an accessor is also known as a setter method

Respuesta :

Only the member functions inside the class have access to the class members that have been defined as private.

Any object or method outside the class is not permitted to access them directly. The class members' secret data can only be accessed by member functions or friend functions. Private fields of classes shouldn't be altered by mutators. A mutator modifies, or "mutates," the private fields of a class. The private fields of a class should not be altered by an accessor. An accessor uses private fields to get access before returning a value or performing an action. A mutator method in computer science is a technique for managing modifications to a variable. They're also frequently referred to as setter methods. A setter is frequently present.

Learn more about function here-

https://brainly.com/question/28939774

#SPJ4

Otras preguntas