It seems that mutator and accessor functions defeat the purpose of making the member variables private. Why is this not so?
What will be an ideal response?
The mutator functions can filter data and control the way data members are set. For example, you (as class author) can exclude illegal data. With accessor functions you (as class author) can allow the client to see just the variables you want seen, in the format in which you want them seen.
You might also like to view...
Since it can be difficult to remember the character numbers for different symbols, some symbols can be identified using a character ____________________ reference.
Fill in the blank(s) with the appropriate word(s).
Operational databases are used for extracting data for decision making
Indicate whether the statement is true or false
The word ____ is placed before the Sub keyword when creating a Sub procedure to specify that the procedure can be called only by code within the class in which it exists.
A. Contained B. Private C. Inner D. Distinct
This tool calculates the value required in a single cell to produce a result with in a related cell.
What will be an ideal response?