Object Oriented Programming

1) Encapsulation : Binding (or wrapping) data and functions that operate on that data together into a single unit is known as encapsulation.

2) Abstraction: Showing functionality and hiding internal details is known as abstraction.
eg. A database system hides certain details of how data is stored and created and maintained.

3) Inheritance: When one object acquires the properties and behaviors of parent object i.e. known as inheritance.

It provides code reusability. It is used to achieve runtime polymorphism.

eg. Mountain bikes, road bikes, and tandem bikes, for example, all share the characteristics of bicycles (current speed, current pedal cadence, current gear).

4) Polymorphism: refers to the ability of a variable, function or object to take on multiple forms.

Polymorphism could be static and dynamic both. Overloading is static polymorphism while, overriding is dynamic polymorphism.

Overloading in simple words means two methods having same method name but takesĀ  different input parameters. This called static because, which method to be invoked will be decided at the time of compilation

Overriding means a derived class is implementing a method of its super class.

eg. To speak something e.g. cat speaks meaw, dog barks woof