KnowledgeBoat Logo

Computer Applications

What are the differences between Procedural Programming and Object-oriented Programming?

OOP Intro Java

113 Likes

Answer

Procedural ProgrammingObject-Oriented Programming
Follows a top-down approachFollows a bottom-up approach
Instruction OrientedData Oriented
The abstraction is at procedure (function) level.The abstraction is at object (class) level.
The sequence of events in a large program is divided into functions.Entire program is divided into objects.
Interaction with program is via direct function calls.Interaction with program is via functions defined in the class only.
Real world is represented by 'procedures' operating on data.Real world is represented by objects and the operations that can be performed on these objects.
Data and functions are separate.Data and functions are encapsulated into a single unit.
Data security is less as it contains lesser features to protect the data.It is more secure as one of its primary features include data hiding.
A function can access any other function's data by calling that function.Only the data whose access has been granted can be accessed by another function.
Limited and difficult code reusability.Versatile and easy code reusability.
Code is difficult to modify, extend and maintain.Code is easy to modify, extend and maintain.
Some examples of Procedural Programming languages are C, COBOL, Pascal.Some examples of Object Oriented languages are C++, Java, C#.

Answered By

58 Likes


Related Questions