.. include:: Exercise: Access Methods for Members ==================================== .. contents:: :local: Description ----------- In exercise :doc:`../user-simple-method/exercise`, you had to modify ``class User``: you removed the ``const`` specifier from the ``age`` member. ``age`` is still ``public``, which gives everybody permission to write to ``age`` - not only class methods. Introduce a ``private`` section, and put *all* (not just ``age``) into that section. This will break all code that accesses members directly. **Fix that**: introduce *access methods* for the members.