CHARACTERISTICS OF OOP
Object Oriented Programming (OOP) is an approach to program organization and development that attempts
to eliminate some of the pitfalls of conventional programming methods by incorporating the best of
structured programming features with several powerful new concepts.
It is necessary to understand some of the basic concepts used extensively in object-oriented
programming. These include:
• Dynamic binding
• Message passing
We shall discuss these concepts in some detail in this section.
Objects are the basic run time entities in an object-oriented system. They may represent a person, a place, a
bank account, a table of data or any item that the program has to handle.
Objects are characterized by three essential properties:
1. State: represents data (value) of an object.
2. Behaviour: represents the behaviour (functionality) of an object(implemented as methods).
3. Identity: it is used to identify each object uniquely. The identity of an object distinguishes one object
Some things are not objects, but are attributes; e.g. age, color. An attribute is a specification that defines a
property of an object, element, or file. It may also refer to or set the specific value for a given instance of
Class can be considered as the blueprint or a template for an object and describes the properties and
behaviour of that object, but without any actual existence. An object is a particular instance of a class which
has actual existence. Once a class has been defined, we can create any number of objects belonging to that
class. Each object is associated with the data of type class with which they are created. A class is thus a
collection of objects similar types. For examples, Mango, Apple and orange members of class fruit.
Abstraction refers to the act of representing essential features without including the background details or
explanation. To understand this concept more clearly, take an example of 'switch board'. You only press
particular switches as per your requirement. You need not know the internal working of these switches.
What is happening inside is hidden from you. This is abstraction, where you only know the essential things
to operate on switch board without knowing the background details of switch board.
The wrapping up of data(properties) and function(behaviour) into a single unit (called class) is known as
encapsulation. Data encapsulation is the most striking feature of a class. The data is not accessible to the
outside world, and only those functions which are wrapped in the class can access it. These functions
provide the interface between the object’s data and the program. This insulation of the data from direct
access by the program is called data hiding or information hiding. For example - in school, a student cannot
exist without a class.
Inheritance is the process by which objects of one class acquired the properties and behaviours of objects of
another classes. It supports the concept of hierarchical classification. It is the capability to define a new
class in terms of an existing class. An existing class is known as a base class or parent class or super class
and the new class is known as derived class or child class or sub class.