210: Highlights
- Constructors, readers, and writers are called access
functions. When you move references and assignments into access
functions, you are practicing data abstraction.
- Data abstraction has many virtues, including the following:
- Your programs become easier to reuse.
- Your programs become easier to read.
- You easily can augment what a class provides.
- You easily can improve the way data are stored.
If you anticipate that the detailed definition of a
class may change, then you should provide access functions for the
member variables to isolate the effects of the potential changes.