OOP part of 118 Flashcards
1
Q
What are the four pillars of OOP?
A
Abstraction,Encapsulation,Inheritance and Polymorphism.
2
Q
What is abstraction?
A
Abstraction is where you hide the complex details from the user and just display the important details.
3
Q
What is encapsulation?
A
Encapsulation is where data and methods specific to a class are stored within objects of that class.Access modifiers can be used to achieve this.
4
Q
What is inheritance?
A
Inheritance is where child classes (sub classes) are able to use all public and protected attributes and methods stored within the parent (super class)