S.O.L.I.D. Flashcards

1
Q

Which clean-coding principle does the “S” in SOLID represent?

A

single responsibility

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

Which clean-coding principle does the “O” in SOLID represent?

A

open / closed

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

Which clean-coding principle does the “L” in SOLID represent?

A

Liskov substitution

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

Which clean-coding principle does the “I” in SOLID represent?

A

interface segregation

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

Which clean-coding principle does the “D” in SOLID represent?

A

dependency inversion

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

The Single Responsibility Principle says we should limit code to one purpose per…?

A

class

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

Applying the Single Responsibility Principle limits the frequency we need to…?

A

change code

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

Applying the Single Responsibility Principle makes it easier to understand the code’s…?

A

purpose

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

The Open / Closed Principle says we should leave software open to…?

A

extension

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

The Open / Closed Principle says we should make software closed to…?

A

modification

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

Applying the Open / Closed Principle means we should be able to add what without changing existing code?

A

functionality

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

The Liskov Substitution Principle says a child class should do what for everything in the parent class?

A

implement

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

Applying the Liskov Substitution Principle means we should be able to interchange the parent and child class without getting…?

A

incorrect results

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

The Interface Segregation Principle says clients shouldn’t be forced to depend on interfaces that…

A

they don’t use

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

Applying the Interface Segregation Principles means to avoid implementing something if it’s not…

A

needed

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

The Dependency Inversion Principle says that high-level modules shouldn’t depend on…

A

low-level modules

17
Q

The Dependency Inversion Principle says that high-level modules, low-level modules, and details should all depend on…

A

abstractions

18
Q

The Dependency Inversion Principle says that abstractions shouldn’t depend on…

A

details

19
Q

Applying the Dependency Inversion Principle prevents what when dependencies change?

A

breakage

20
Q
A