What is OOP ?
An OOP is a way of programming that focues on using objects & classes to format design and build any applications.
In other words, OOP is a type of programming which is based on objects and classes rather than functions & procedures.
Major pillars of OOP are Inheritance, Abstraction,Encapsulation & Polymorphism . It also works with objects ans classes.
Why we use OOP?
provides a clear program structure which makes it easy to map real world problems and their solutions .
Code can be reused through inheritance thereby reducing redundancy.
Data and code are bound together by encapsulation .
OOPs allows data hiding ,thereby private data is kept confidential .
Problems can be divided into different parts making it simple to solve.
Enhances program modularity because each object exists independently & new features can be added easily without disturbing the existing ones.
Presents a good framework for code libraries where supplied components can be easily adapted and modified by the programmer.
The concept of polymorphism gives flexibility to the program by allowing the entities to have multiple forms.