In all .net interviews the Object Oriented Related questions are inevitable. Weather you are a fresher or an experienced one no matters the Object Oriented questions are like mandatory thing for every interviews . I am listing out most frequently asked OOPS questions .
Q)What
is OOPS? (OOPS Interview questions-1)
OOP is
Object Oriented Progamming. OOPS Based system mainly deals with the
Objects. Objectas are nothing but instants of a class.
Q)What
is different concepts of OOPS? (OOPS Interview questions-2)
- Abstaction
- Encapsulation
- Inheritance
- polymorphism
Q)What
is Abstraction?(OOPS Interview questions-3)
Abstraction
is a concptual level in class design . Showing what is necessory is
abstraction. Abstraction's main concept is to handle the complexity
which is achived by hiding the unneccessory details from the end
developer.
Q)What
is Encapsulation? (OOPS Interview questions-4)
Encapsulation
is wrapping the data and its all behaviours inside a sigle unit
(class). In enclapusulation all data is not accessed directly , but
it is accessed through the member functions present inside the class
. So that the end programmer need not to worry about the
implementation . They just have to use these functions and class. In
another word encapsulation establishes the data hiding concept .
Q)
What is polymorphism ? (OOPS Interview questions-5)
Polymorphism
is the ability of an object to take more than one forms.It is the
ability of the programming language to process objects differently
based on the datatype . There are mainly two types of polymorphism Compile time and Run time polymorphism
Q)What
is Runtime Polymorphism ? (OOPS Interview questions-6)
Run
time polymorphism is that the polymorphism archived at the run time of
the execution. It is also called late binding , Method overriding .
The method overriding is done by using 'virtual' keyword in the base
class and 'override' keyword in the derived class.
Basically
we can use the same function name in base class and derived class.
But
the the actual method which runs when creating instance of the
derived class will decide at the run-time. The memory binding will be
done at the execution time.
No comments:
Post a Comment