The object in the above model has two layers: an outer shell and an inner core. Users can only see the outer shell, while the inner core remains hidden (the internal status of an object can only be seen within the object itself).

Public components (outer shell): the outer shell contains the components of the object that are visible to users, such as attributes (data), methods (functions) and events. All users have direct access to these components. The public components of an object form its external point of contact.

Private components (inner core): the components of the inner core (attributes, methods and events) are only visible within the object itself. The attributes of an object are generally private. These private attributes of an object can only be accessed using the methods of that object itself.

Why are the private components of an object “hidden”?
This principle is called “information hiding” or “encapsulation” and is used to protect the user.

Let us assume that an object changes its private components, while its external point of contact remains unchanged. Any user who simply needs to access the object’s external point of contact can carry on working with the object as usual. The user does not notice the change.

However, if an object changes its public components, then any user who accesses these public components must take these changes into account.

Every object has an identity, a status (quantity of attributes) and behavior (quantity of methods and events). The structure and behavior of similar objects are defined in a class which they share.

Identity is a characteristic that differentiates each object from all other objects. Identity is often confused with having the same attribute values or with a unique name. Two different objects can have identical attribute values and still not be identical.

Two coffee cups are the same height and diameter, have the same handle and are both white. Although they look exactly the same, they are still two separate cups.

In the real world, there are objects, such as various airplanes and plane tickets. Some of these objects are very similar, that is, they can be described using the same attributes or characteristics and provide the same functions.

Similar objects are grouped together in classes. Each class is described once, and each object is then created in accordance with this blueprint.
A class is therefore a description of a quantity of objects characterized by the same structure and the same behavior.

An object is a concrete example of a class, the airplane class is a description of the objects LH Munich, LH New York etc.. Objects that belong to the same class have the same attributes and can be accessed using the same methods. There is only one of each class within a software system, but each class can contain several objects.




  1. Thanks
    Its Good For Begineers in ABAP-oops

  2. very good explanation