Thursday, 3 January 2013

Object Oriented Programming Vs Procedure Oriented Programming

Difference between Object Oriented Programming and Procedure Oriented Programming

What is the difference between object oriented programming and procedure oriented programming?

Procedural Oriented Programming(POP)

Procedural Oriented Programming creates a step by step program that guides the application through a sequence of instructions. Each instruction is executed in order. The program is divided into small parts called functions. Full importance is not given to data but to functions as well as sequence of actions to be done. It follows Top Down approach and it does not have any access specifier. When using Procedure Oriented Programming, data can move freely from function to function in the system. However, it is difficult to add data and function on a later point of time. The functions in the Procedure Oriented Programming uses Global data for sharing that can be accessed freely from function to function in the system. Hence the system does not have an option to hide the data and it leads to insecurity.

Object Oriented Programming (OOPs)

Object Oriented Programming is made up of many entities called objects. Objects become the fundamental units and have behavior, or a specific purpose, associated with them. Importance is given to the data rather than procedures or functions because it works as a real world. It follows Bottom Up approach and has access specifiers named Public, Private, Protected, etc. In Object Oriented Programming, objects can move and communicate with each other through member functions. This design provides easy way to add new functions. Data cannot move easily from function to function, it can be kept public or private so we can control the access of data which provides higher data security. There are so many other features available in Object Oriented Programming compared to traditional Procedure Oriented Programming; some of them are as follows. 

The ability to create GUI (Graphical User Interface) programs

Through inheritance, we can eliminate redundant code and extend the use of existing classes.

We can build programs from standard working modules that communicate with one another rather than, having to start writing the code from scratch. This leads to saving of development time and higher productivity.

Software complexity can be easily managed.

1 comment :

  1. in pop Full importance is not given to data but to functions. in oop Full importance is given to data . how