The traditional view of a program
(as embodied in Pascal and C)
is a collection of procedures (or functions)
that act on a set of variables.
In object-oriented programming (OOP),
a program is a collection of interdependent components (called objects),
each of which provides a service as specificed by its interface.
An object is a collection of operations (called methods or functions)
that share the state (variables) of the object.
The state of an object cannot be modified
other than by invoking one of the object's functions.