OOP Concepts Flashcards

1
Q

What are the 4 concepts

A

Abstraction, Encapsulation, Polymorphism, Inheritance.

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

Goals of OOP

A

Robustness, Reusability, Adaptability, Modularity

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

Abstraction

A

Using simple things to represent complexity.
ie Hide complexity using simple “black boxes”.

Things like objects, classes, and variables represent more complex underlying code and data.

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

Encapsulation

A

Keep fields within a class private, then providing access to them via public methods.

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

Inheritance

A

Create new classes that share some of the attributes of existing classes.

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

Why Abstraction

A

Hide unnecessary details and complexity from users.

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

Why Encapsulation

A

We can re-use objects like code components or variables without allowing open access to the data system-wide.

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

Why Inheritance

A

Allows us to build on previous work without reinventing the wheel.

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

Polymorphism

A

Allows programmers to use the same word to mean different things in different contexts.

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