Object Oriented Programming VS. Procedural Programming
There is always debate which one is good object oriented programming
or Procedural Programming.
First we understand the definition of object oriented programming
and procedural programming.
Object-oriented
programming is a programming paradigm
that uses abstraction (in the form of classes and objects) to create models
based on the real world environment. An object-oriented application uses a
collection of objects, which communicate by passing messages to request
services. Objects are capable of passing messages, receiving messages, and
processing data. The aim of object-oriented programming is to try to increase
the flexibility and maintainability of programs. Because programs created using
an OO language are modular, they can be easier to develop, and simpler to
understand after development.
Object-oriented Programming is a programming language that uses
classes and objects to create models based on the real world environment. An
Object-oriented Programming application may use a collection of objects which
will pass messages when called upon to request a specific service or
information. Objects are able to pass, receive messages or process information
in the form of data.
Procedural programming is aset of instructions telling a computer what to do step by step
and how to perform from the first code to the second code. Procedural language
is a type of computer programming language that specifies a series of
well-structured steps and procedures within its programming context to compose
a program. It contains a systematic order of statements, functions and commands
to complete a computational task or program.
Procedural
language is a type of computer
programming language that specifies a series of well-structured steps and
procedures within its programming context to compose a program. It contains a
systematic order of statements, functions and commands to complete a
computational task or program.
Now we compare the both languages their features wise.
- In POP, program is divided into small blocks or parts called functions.
- In OOP, program is divided into parts called objects.
- POP follows Top Down approach.
- OOP follows Bottom Up
- 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.
- 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.
- To add new data and function in POP is not so easy.
- OOP provides an easy way to add new data and function.
- POP does not have any proper way for hiding data so it is less secure.
- OOP provides Data Hiding so provides more security.
- In POP, Overloading is not possible.
- In OOP, overloading is possible in the form of Function Overloading and Operator Overloading.
- Example of POP are: C, VB, FORTRAN, and Pascal.
- Example of OOP are: C++, JAVA, VB.NET, C#.NET.
Procedural
procedure
record
module
procedure call
Object-oriented
method
object
class
message
If you like this post please share and like this
To Learn More About object oriented
programming in Ahmedabad, TCCI
No comments:
Post a Comment