In this tutorial you will learn about the Object Oriented Programming vs Procedural Programming and its application with practical example.
Object-Oriented Programming vs Procedural Programming
Object-Oriented Programming | Procedural Programming |
Emphasis on Data; binding of data structures with methods that operate on data | Emphasis on algorithms, procedures |
Real-world is represented by objects mimicking external entities. Allows modeling of the real-life problems into objects with state and behavior |
Real-world is represented by logical entities and control flow. Tries to fit the real-life problem into procedural language |
Data (State) is encapsulated effectively by methods (Behavior) | In a given module, data and procedures are separate |
Program modules are integrated parts of an overall program. Objects interact with each other by message passing | Program modules are linked through a parameter passing mechanism |
Uses abstraction at class and object level | Uses abstraction at the procedure level |
Object-Oriented decomposition focuses on abstracted objects and their interaction | Algorithmic decomposition tends to focus on the sequence of events |
Active and intelligent data structures (object) encapsulates all passive procedures | Passive and dumb data structures used by active methods |
Object-Oriented Languages: C++, Small Talk, Java, C#, JavaScript, etc | Procedural languages: C, COBOL, PASCAL |