What is object-oriented programming? How it is different from the procedure-oriented programming?

Subject Object Oriented Programming
NU Year Set: 1.(a) Marks: 6 Year: 2015

Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic. Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data.


Procedure Oriented Programming

Object Oriented Programming

Divided Into

In POP, program is divided into small parts called functions.

In OOP, program is divided into parts called objects.


In POP, Importance is not given to data but to functions as well as 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.


POP follows Top Down approach

OOP follows Bottom Up approach.

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.

Data Access

In POP, 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 or private so we can control the access of data.

Data Hiding

POP does not have any proper way for hiding data so it is less secure.

OOP provides Data Hiding so provides more security.


Example of POP are : C, VB, FORTRAN, Pascal.

Example of OOP are : C++, JAVA, VB.NET, C#.NET.

Login to post your comment.