OOP Flashcards
1
Q
Abstraction
A
Abstraction is the process of hiding the implementation details from the user. Only the functionality will be provided to the user.
2
Q
How is abstraction achieved
A
Using abstract classes and interfaces
3
Q
Encapsulation
A
wrapping variables and methods in one single unit with the sole purpose of data hiding from external classes because you want to keep the variables hidden.
4
Q
how is encapsulation achieved
A
Declare variables of a class as private. Provide public setter and getter to modify and view the variables.
5
Q
Inheritance
A
Allows classes to be derived from other classes
6
Q
Polymorphism
A
Allows subclasses of a class to define their own unique behaviours and yet share some of the same functionality.