OOP Flashcards
(6 cards)
Abstraction
Abstraction is the process of hiding the implementation details from the user. Only the functionality will be provided to the user.
How is abstraction achieved
Using abstract classes and interfaces
Encapsulation
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.
how is encapsulation achieved
Declare variables of a class as private. Provide public setter and getter to modify and view the variables.
Inheritance
Allows classes to be derived from other classes
Polymorphism
Allows subclasses of a class to define their own unique behaviours and yet share some of the same functionality.