Classes

Encapsulation is an important concept in object-oriented programming. Below are two quotes describing the principle of encapsulation:

"Encapsulation...refers to the practice of including within an object everything it needs, and furthermore doing this in such a way that no other object need ever be aware of this internal structure."
-I. Graham, Object-Oriented Methods, Addison-Wesley, 1991

"Encapsulation...consists of separating the external aspects of an object which are accessible to other objects, from the internal implementation details of the object which are hidden from other objects."
-Rubaugh et al, Object-Oriented Modeling and Design, Prentice-Hall, 1991

Here are examples of classes that encapsulate some functionality. The purpose of these classes is not to be executed but instead to be used inside of other classes.