2. OOPs
* Object Oriented programming is a programming style which is associated with the
concepts.
* It is most popular concept in programming languages like Java, C++, C#, Ruby, etc.
Concepts in Object oriented Programming that,
- Object
- Class
- Inheritance
- Encapsulation
- Abstraction
- Polymorphism
3. INHERITANCE
* Mechanism of inheritance is deriving new class from an already existing class.
* Five types of inheritance
- Single level
- Multilevel
- Multiple
- Hierarchical
- hybrid
4. ENCAPSULATION
* Wrapping up of data and function into single unit is called encapsulation.
* The data is not accessible to outside world only those function which are
wrapper in the class can access it.
* The insulation of the data from direct access by the program is called data hiding or
information hiding.
E.g.:
5. ABSTRACTION
* Abstraction is selecting data from a larger pool to show only the relevant details to
the object.
* It helps to reduce programming complexity and effort.
* Abstraction is related to both encapsulation and data hiding.
E.g.:
6. POLYMORPHISM
* Polymorphism is a OOPs concept where one name can have many forms.
“Poly” = many, “morphism” = forms
* There are two types of polymorphism
- Run time polymorphism
- Compile time polymorphism
E.g.: