Published by: sadikshya
Published date: 17 Jun 2021
The features of Object-Oriented Programming are given bellow:-
a. Object:-
The object is a collection of the number of entities. Objects take up space in the memory. Objects are instances of classes. When a program is executed, the objects interact by sending messages to one another. Each object contains data and code to manipulate the data. Objects can interact without having to know details of each other’s data or code.
b. Class:-
Class is a collection of objects of similar type. Objects are variables of the type of class. Once a class has been defined, we can create any number of objects belonging to that class.
c. Encapsulation
Combining data and functions into a single unit called class and the process is known as Encapsulation. Data encapsulation is an important feature of a class. A class contains both data and functions. Data is not accessible from the outside world and only those function which is present in the class can access the data. The insulation of the data from direct access by the program is called data hiding or information hiding. Hiding the complexity of the program is called Abstraction.
d. Dynamic Binding
Refers to linking a function call with function definition is called binding and when it is taking place at run time called dynamic binding.
e. Message Passing.
The process by which one object can interact with another object is called message passing.
f.Inheritance
Inheritance is the process by which the object of one class acquires the properties or features of objects of another class. The concept of inheritance provides the idea of reusability means we can add additional features to an existing class without modifying it. This is possible by driving a new class from the existing one. The new class will have the combined features of both the classes.
g. Polymorphism
A greek term means the ability to take more than one form. An operation may exhibit different behaviors in different instances. The behavior depends upon the types of data used in the operation.