SOLID Principles Flashcards

1
Q

S

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

O

A

Open/Closed Principle

Software entities should be open for extension but closed for modification.

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

L

A

Liskov Substitution Principle

Subtypes must be substitutable for their base types.

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

I

A
Interface Segregation Principle
The dependency of one class to another one should depend on the smallest possible interface.
- Clients should not be forced to implement interfaces they don't use.
- Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

D

A

Dependency Inversion Principle

Depend upon abstractions (interfaces), not concrete classes.

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