make simple class in c++..
to explain how accessor, mutators etc works
Member functions that only access the data members are called accessors.
Similarly, member functions that modify the data members, called mutators.
Advantage--
We can make our data members private and use accessors and mutators to make changes in them.
Therefore, the data members will not be accessed directly by the object outside the class.
Get Answers For Free
Most questions answered within 1 hours.