Object Oriented Programming (OOP) Flashcards

1
Q

What is a class in OOP?

A

A blueprint for creating objects.

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

What is an object in OOP?

A

An instance of a class.

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

What is encapsulation?

A

Hiding the internal details of an object and only exposing necessary parts.

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

What is inheritance?

A

When a class derives properties and methods from another class.

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

What is polymorphism?

A

When a method behaves differently based on the object calling it.

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

What is the difference between a class and an object?

A

A class is a blueprint, and an object is an instance of that blueprint.

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