Saturday, February 6, 2021

Differences between Procedural and Object Oriented Programming

Oracle Database Exam Preparation, Database Career, Oracle Database Study Materials, Database Exam Prep

Procedural Programming:

Procedural Programming can be defined as a programming model which is derived from structured programming, based upon the concept of calling procedure. Procedures, also known as routines, subroutines or functions, simply consist of a series of computational steps to be carried out. During a program’s execution, any given procedure might be called at any point, including by other procedures or itself.

Languages used in Procedural Programming:

FORTRAN, ALGOL, COBOL, 

BASIC, Pascal and C. 

Object Oriented Programming:

Object oriented programming can be defined as a programming model which is based upon the concept of objects. Objects contain data in the form of attributes and code in the form of methods. In object oriented programming, computer programs are designed using the concept of objects that interact with real world. Object oriented programming languages are various but the most popular ones are class-based, meaning that objects are instances of classes, which also determine their types.

Languages used in Object Oriented Programming:

Java, C++, C#, Python, 

PHP, JavaScript, Ruby, Perl, 

Objective-C, Dart, Swift, Scala. 

Differences between Procedural and Object Oriented Programming

Difference between Procedural Programming and Object Oriented Programming:

Procedural Oriented Programming Object Oriented Programming 
In procedural programming, program is divided into small parts called functions. In object oriented programming, program is divided into small parts called objects.
Procedural programming follows top down approach.  Object oriented programming follows bottom up approach. 
There is no access specifier in procedural programming.  Object oriented programming have access specifiers like private, public, protected etc. 
Adding new data and function is not easy.  Adding new data and function is easy. 
Procedural programming does not have any proper way for hiding data so it is less secure.  Object oriented programming provides data hiding so it is more secure. 
In procedural programming, overloading is not possible.  Overloading is possible in object oriented programming. 
In procedural programming, function is more important than data.  In object oriented programming, data is more important than function. 
Procedural programming is based on unreal world.  Object oriented programming is based on real world. 
Examples: C, FORTRAN, Pascal, Basic etc.  Examples: C++, Java, Python, C# etc. 

Related Posts

0 comments:

Post a Comment