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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is abstraction achieved

A

Using abstract classes and interfaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Inheritance

A

Allows classes to be derived from other classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Polymorphism

A

Allows subclasses of a class to define their own unique behaviours and yet share some of the same functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly