Object Oriented Programming vs. Procedural Programming

Introduction to Procedural Programming language

This language referred to as inline programming that executed on top-down approach to programming. The procedural programming application solve the problem from top of the code down to the bottom. When the program start build there are some problems occur then that problems should break-down into smaller sub-problems. Then the sub-problems continuously break-down into smaller components that is known as functional decomposition so that sub-procedure can be simple enough to be solve easily. One of the major issue with procedural programming is that if an edit is needed to the program than programmer has to go through with every line of code in the program to original change in code.

Introduction to Object-oriented Programming languages

This Language uses classes and objects to create model that based on real world. The application of Object-oriented that may use collection of objects which pass message when called upon a specific information. One of the main reason to use object-oriented programming because the language makes easy to maintain and modify existing code by inherit the existing objects. This will take less development time and make the program much simpler. This will make ease of development and ability to understand the code for other developers also. All well commented objects and classes that tell developer the process of the program that he trying to follow.

Difference between Procedural Programming Language and Object-Oriented Programming Language

Procedural Programming LanguageObject-Oriented Programming Language
ImportanceData is not so important but functions and sequence of actions is to be done.Importance is given to data rather than function or procedure of the program.
ApproachTop-Down ApproachBottom-UP Approach
Access SpecifierDoesn't have any access specifierOOPs has access specifier named public, private and protected.
Data MovingAllow data to move freely from function to function.Objects can move and communicate with each other through member functions.
ExpansionTo add any new data or function in procedural programming is not so easy.To add new data or function in Object-Oriented language is easy.
Data AccessIn 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 HidingDoesn't support proper way for data handing so it’s less secureProvide direct support data hiding so more secure.
OverloadingOverloading is not possibleOverloading is possible in the form of function overloading and operator overloading.
PurposeProgram divide into smaller parts know as functions.Program divide into smaller parts known as objects.
ExamplesExample of POP are : C, VB, FORTRAN, Pascal.Example of OOP are : C++, JAVA, VB.NET, C#.NET.