Procedural VS Object Oriented Programming

Object Oriented and Procedural are two programming paradigm. Procedural programming creates a step by step program that guides the application through a sequence of instructions. Procedural programming is also called linear programming. Generally, code is executed from the top of the file to the bottom in procedural programming. Object Oriented uses object to design applications and computer programs. It isn’t as linear as procedural programming. Code is often broken up and distributed across multiple files, each one with a single purpose.

  1. Programming Style: Procedural is linear programming and OOP is not linear programing.
  1. Fundamental Unit: Function is the fundamental unit of procedural programming and object is the fundamental unit of OOP.
  1. Code Organization: In procedural programming code is organized into small procedures. This procedure is used to perform any operation.

In object oriented programming, the data and related functions are bundled together into an object.

  1. Data Orientation: In procedural programming functions have no intrinsic relationship with the data they operate on. Here, you provide the correct number and type of arguments, the function will do its work and returns its output.

In object oriented programming, the data and related functions are bundled together into an “object”. Ideally, the data   inside an object can only be manipulated by calling the object’s functions.

  1. Global and Shared data: We can see that one of the principle differences is that procedural systems make use of shared and global data, while object oriented systems lock their data privately away in objects.
  1. Reusability: Reusability is one of the best features of OOP. Reusability is higher than procedural programming.
  1. Abstraction: Abstraction of OOP is higher than procedural programming so maintenance is easy.
  1. Inheritance: Inheritance is the key of OOP but Procedural programming doesn’t support inheritance.
  1. Encapsulation & Polymorphism: Encapsulation and polymorphism is two key features of OOP which are absent in procedural programming.
  2. Coupling and Cohesion: Loosely couple and maximum cohesion in the system is only possible by OOP but it is not possible by procedural programming.
  3. Cost: OOP takes less cost than Procedural programming.
Please share, if it is helpfulShare on FacebookShare on LinkedInTweet about this on TwitterShare on Google+Email this to someonePrint this page

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>