SOLID Design Principles Flashcards

1
Q

Single-responsibility principle

A

A class should have only one responsibility.

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

Open-closed principle

A

A software entity 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

Liskov substitution principle

A

If S is a subtype of T, then objects of type T may be replaced with objects of type S.

Objects of a superclass shall be replaceable with objects of its subclasses without breaking the application.

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

Interface segregation principle

A

No client should be forced to depend on methods it does not use.

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

Dependency inversion principle

A

High-level modules should not depend on low-level modules. Both should depend on abstractions.

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

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