Object

Object is the most fundamental concept in Object-Oriented programming. It is a self-contained collection of data and an associated set of functions that can be used to access and manipulate those data.

Basic object. Shows a set of variables, located in the center, that are hidden from the outside world and a set of public methods, located around the perimeter, that may be used to access and manipulate the data.

An Object-Oriented program operates by constructing a set of objects and then enabling them to interact with one another by exchanging messages. Such programs are implemented by, first, defining a set of classes that establish a set of object types and, second, instantiating those classes to create specific objects.

For example, if one were building a graph, one would first define classes for graph and node. After instantiating the graph, one would then instantiate a node each time a new node is needed.