Final answer:
Accessors (getters) and mutators (setters) enable safe access and modification of private class data, embodying the principles of encapsulation in object-oriented programming.
Step-by-step explanation:
Accessors and mutators, often referred to as getters and setters, are methods used in object-oriented programming. The main role of accessors, or getters, is to read the values of private fields, whereas mutators, or setters, are used to safely modify the values of these fields. This encapsulation strategy is critical for controlling how data within an object is accessed and modified, ensuring that data remains valid and the object's integrity is maintained.
The correct answer to the given question is: a. Allow private data to be accessed outside of the class and be safely modified. This is because accessors and mutators are designed specifically to provide controlled access to private class members, which are not directly accessible from outside the class due to encapsulation.