The concept of objects
Object-oriented programming consists of arranging data in modular sets of elements of real
world information (called a domain. These data elements are called objects.
This data is grouped according to the main real world characteristics of those elements (size, color, etc...).
The object approach is an idea that has been well proven. Simula was the first programming
language to implement the concept of classes in 1967! In 1976, Smalltalk implemented the concepts of
encapsulation, aggregation and inheritance (the principle concepts of the object-oriented programming). On the other
hand, several object-oriented programming languages have been implemented on a global scale
(Eiffel, Objective C, Loops, etc.).
The difficulty with this modular approach is the creation of an abstract representation, in the form of
objects, entities that actually exist (dog, car, lightbulb...) or virtually exist (social security, weather, etc.).
An object is characterised by several concepts:
- Attributes: this is the data that characterises an object. These are variables which store data relating
to the state of an object.
- Methods (often called member functions): An object's methods characterise its behavior, meaning
all actions (called operations
) that the object itself is capable of performing. These operations enable the
object to respond to external requests (or to act on other objects). Furthermore, operations are closely linked to
attributes, as their actions may depend on or even modify attribute values.
- Identity: The object has an identity, which distinguishes it from other objects, regardless of its state.
This identity is usually created using an identifier which is derived from the type of item (for example: a product
may be denoted by a code, a car by a model number, etc.)
This document, titled « The concept of objects », is available under the Creative Commons
license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM