SOLID Principles Flashcards

1
Q

SOLID is a

A

mnemonic for five design principles intended to
make software designs more understandable, flexible and
maintainable.

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

Single Responsibility Principle

A

A class should have just one reason to change.

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

Open/Closed Principle

A

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
4
Q

Liskov Substitution Principle

A

When extending a class, remember that you should be
abletopassobjectsofthesubclassinplaceofobjectsof
the parent class without breaking the client code.

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

Interface Segregation Principle

A

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
6
Q

Low-level classes

A

implement basic operations such as working with a disk, transferring data over a network, connecting to a
database, etc.

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

Dependency Inversion Principle

A

High-level classes shouldn’t depend on low-level class-
es. 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
7
Q

High-level classes

A

contain complex business logic that directs
low-level classes to do something.

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