SOLID Flashcards

1
Q

What SOLID stand for?

A

Single-Responsibility Principle (SRP)
Open-Closed Principle (OCP)
Liskov Substitution Principle (LSP)
Interface Segregation Principle (ISP)
Dependency Inversion Principle (DIP)

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

What’s Single-Responsibility Principle (SRP)?

A

A class should have only one reason to change.

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

What’s Open-Closed Principle (OCP)?

A

Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.

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

What’s Liskov Substitution Principle (LSP)?

A

Subtypes must be substitutable for their base types.

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

What’s Interface Segregation Principle (ISP)?

A

Clients should not be forced to depend upon methods that they do not use. Interfaces belong to clients, not to hierarchies.

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

What’s Dependency Inversion Principle (DIP)?

A

Abstractions should not depend upon details. Details should depend upon abstractions.

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