Section 3 QuestPond OOPS Flashcards
Why do we need OOPS?
This forces developers to think in terms of real world objects.
Example,
When we deign a program, we think it in a real-world obejcts. We capture nouns as class.
Pillars of OOPS?
APIE..
Abstraction
Polmorphism
Inherinace
Encapsulation
What is class and Objects?
Class is a blueprint of an object.Object is an instance of an object.
Abstraction vs Encapsulation.
Abstraction is hiding the unnecessary data and encapsulation is hide complexity.
ABstraction happens in design phase… Encapsulation during implementation phse.
Encapsulation implements abstraction.
explain Inheitance?
Inheitance defines a parent child relationship.
What is is-a relationship?
same as inheirtnace…
explain Virtual Keyword?
Virtual keywod helps to overide the implementation of a base class.
What is method overlaoding
Same method name with different siganatures.
Difference between overriding overloading?
Overriding is a parent child relationship