OOPs: Object-Oriented Programming
POP: Procedure Oriented Programming
Procedure Oriented Programming |
Object-Oriented Programming |
Divided Into |
|
In POP, the program is divided into small parts called functions. |
In OOP, the program is divided into parts called objects. |
Importance |
|
In POP, Importance is not given to data but to functions as well as a sequence of actions to be done. |
In OOP, Importance is given to the data rather than procedures or functions because it works as a real world. |
Emphasizing |
|
Emphasizes on functions. |
Emphasizes on data. |
Approach |
|
POP follows Top-Down approach. |
OOP follows Bottom-Up approach. |
Access Specifiers |
|
POP does not have any access specifier. |
OOP has access to specifiers named Public, Private, Protected, etc. |
Data Moving |
|
In POP, Data can move freely from function to function in the system. |
In OOP, objects can move and communicate with each other through member functions. |
Passing of data |
|
Data may get passed from one function to another. |
Data never get passed from one object to another. |
Expansion |
|
To add new data and function in POP is not so easy. |
OOP provides an easy way to add new data and functions. |
Modification of program |
|
Modification of a completed program is very difficult and it may affect the whole program. |
Modifications are easy as objects stay independent to declare and define. |
Data Access |
|
In POP, the Most function uses Global data for sharing that can be accessed freely from function to function in the system. |
In OOP, data can not move easily from function to function, it can be kept public, private or protected, so we can control the access of data. |
Data Hiding |
|
POP does not have any proper way of hiding data so it is less secure. |
OOP provides Data Hiding so it provides more security. |
Data identification |
|
In large programs, it is very difficult to find what data has been used by which function. |
As data and functions stay close, it is easy to identify data. |
Overloading |
|
In POP, Overloading is not possible. |
In OOP, overloading is possible in the form of Function Overloading and Operator Overloading. |
Examples |
|
Example of POP is: C, VB, FORTRAN, Pascal. |
Example of OOP is: C++, JAVA, VB.NET, C#.NET. |