OOP Flashcards

1
Q

Abstraction

A

Abstraction is a model of a real-world object or phenomenon,
limited to a specific context, which represents all details relevant to this context with high accuracy and omits all the rest.

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

Encapsulation

A

Encapsulation is the ability of an object to hide parts of its state and behaviors from other objects, exposing only a limited interface to the rest of the program.

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

Inheritance

A

Inheritance is the ability to build new classes on top of existing ones. The main benefit of inheritance is code reuse.

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

Polymorphism

A

Polymorphism is the ability of a program to detect the real class of an object and call its implementation even when its real type is unknown in the current context.

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

Solid - S

A
Single Responsibility Principle
A class should have just one reason to change.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Solid - O

A

Open/Closed Principle
Classes should be open for extension but closed for
modification.

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

Solid - L

A
Liskov Substitution Principle
When extending a class, remember that you should be
able to pass objects of the subclass in place of objects of the parent class without breaking the client code.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Solid - I

A

Interface Segregation Principle
Clients shouldn’t be forced to depend on methods they
do not use.

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

Solid - D

A

Dependency Inversion Principle
High-level classes shouldn’t depend on low-level classes. Both should depend on abstractions. Abstractions shouldn’t depend on details. Details should depend on abstractions.

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