← Back to Articles List

Object Oriented Programming

OOP stands for Object Oriented Programming.

What is a class?
class is a user defined data type. It is the building block of object oriented programming. 

- It contains data members and member functions. 
- Member functions operate on the data members. 
- It is like a blueprint or template of objects having common properties and methods.
 
What is an object?
Object is an instance of a class.
 
Difference between OOP and Structured Programming.
OOP follows bottom-up approach. Structured Programming follows top-down approach.

OOP restricts the open flow of data to authorized parts only. Structured Programming has no restriction to the flow of data.

OOP has enhanced code reusability due to the concepts of polymorphism and inheritance. In structured programming, code reusability is achieved by using functions and loops.

Methods work dynamically. Functions are called sequentially.

Modifying the code is easier. Modifying the code is comparatively difficult.

Data is given more importance. Code is given more importance.