Parameter | Object Oriented Programming | Functional Programming |
Definition | A programming paradigm based on the concept of objects which contains data in the form of fields called attributes and code in the form of methods | A programming paradigm based on the concept of procedure calls |
Paradigm | | |
Approach | Bottom-up Approach | Top-down Approach |
Data Control | In OOP data in each function is controlled on its own | In POP every function has different data so no control over it. |
Emphasis | Emphasis on objects | Emphasis on functions |
Communication | Objects communicate with each other by message passing | Parameters communicate with each other by parameter passing |
Inheritance | Inheritance is supported by three modes : private, protected and public | Inheritance is not supported |
Access Control | Access control is done with access modifiers | Access modifiers is not supported |
Data Hiding | Data can be hidden is using Encapsulation | No data hiding. Data is accessible globally |
Overloading or Polymorphism | Overloading functions, constructors and operators are possible | Overloading is not possible |
Security | More secured language because external functions can’t access another data. | Due to global data, it is less secured language |
Code reusability | Existing code can be reused | No code reusability |
Problem Solving | Used for solving big problems | Not used for solving big problems |
Example | C++, Java,C#, PHP, Python | COBOL, C, FORTRAN, BASIC, PASCAL |