As we noted in Chapter 1, the idea of a class is intended to provide two very essential services.
A class provides a mechanism for encapsulation. A class can be designed to provide a service. Users of the service need only know the interface for the class, while the internal details that describe how this service is implemented can be hidden from users of the service. This idea of information hiding is important in controlling the complexity of software systems, since we can use it to limit the amount of information that must be remembered or communicated among programmers.
The second service provide by a class is the idea of instantiation, the ability to stamp out multiple copies of an abstraction.