Encapsulation and Instantiation

Classes are the bedrock on which all other object-oriented features are constructed. Classes provide a number of very important capabilities. First and formost is encapsulation. Like the earlier concept of the module, a class provides a wrapping behind which can be hidden an implementation. By controlling what features can be seen outside the class and what features are purely internal, they reduce the amount of information that needs to be remembered or communnicated among the various programmers working on a project. As with an abstract data type, this encapsulation allows one to characterize an object by the service it provides, independently of the way that service is being realized. And finally, classes are the mechanism for instantiation, the ability to stamp out multiple of instances of the same abstraction.

[audio] [real] Text to accompany slide03, in Chapter 4 of An Introduction to Object-Oriented Programming