Procedural Vs. Object Oriented Programming
In this particular article we will learn about difference between Object Oriented Programming (OOP) and procedural programming. Let’s learn by making some key differences:
Division Of Program
In procedural programming a program is divided into small functions while in oop it is divided into objects.
In procedural programming importance is not given to data but to procedure. But in oop importance is given to data rather than functions. Because in oop it works well with real world objects.
In procedural programming top down approach is followed but in oop bottom up approach is followed.
In procedural programming no access specifiers are used. But in oop different type of specifiers are used for different level of data protection.
In procedural program data can move freely from function to function. But in oop data can only move from member functions.
In procedural programming most of the time global data can be used. So all functions of program uses global data. In oop public or private access specifiers are used to control the data access.
In procedural programming no particular method is used for data hiding. And therefore it is less secure. A particular method is used for data hiding in oop so it is more secure.
Overloading is not possible in procedural programming. Overloading is possible in oop in the form of function overloading and overloading operator.
Examples of procedure oriented are c, vb, fortran. And examples of object oriented are Java, C#.Net etc.
So all the above are key difference between procedural and object oriented programming.