0% found this document useful (0 votes)
12 views

OOPs Notes

Uploaded by

pulkit varshney
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

OOPs Notes

Uploaded by

pulkit varshney
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

OOPs - It is a Programming paradigmthat is based on the concept of objects rather

than functions.

Purpose of OOP -
i- It is easy to implement.
ii- It is easy to extend.
iii- It is easy to maintain.

Class - It is a Blueprint of an Object.


It is a Bundle of Properties and Behaviour

Object - An Object is a real world entity that has properties and behaviour.
Instance Of a class.

Pillars Of OOP -
1 - Inheritence
2 - Polymorphism
3 - Abstraction
4 - Encapsulation

Encapsulation - Binding of data and method together in a single unit.


Abstraction - hiding internal details and exposing only what is necessary.
Inheritence - A process By which one class can inherit properties and behaviour
from another class.
Polymorphism - It means to exist in Many Forms.
Types - 1 - Run Time Polymorphism
2 - Compile Time Polymorphism

Constructor - It is a Function used to construct an instance of a class.


It's name is always same as the class name.
Also it has no return type.

destructor - It is a Function used to destruct an instance of a class.

access modifiers - public, private,protected.

Compile Time Polymorphism - It is a Type of Polymorphism that happend at Compile


time.
It is also Known as static Polymorphism.

ex - Function Overloading

Run Time Polymorphism - It is a Type of Polymorphism that happend at Run time.


It is also Known as Dynamic Polymorphism.

ex - Function Overriding

Function Overloading - When Same Function Behaves differently with different no. of
Parameters.

for ex - Constructor Function(default


Constructor,Parameterized Constructor);
Function Overriding - The process of redefining the same function in the derived
class is known as function overriding.

resources - https://www.interviewbit.com/oops-interview-questions/
https://www.javatpoint.com/oops-interview-questions
https://www.geeksforgeeks.org/oops-interview-questions/

You might also like