SOLID Flashcards

1
Q

S

A

classes/programs should have single responsibility\

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

O

A

“Software entities … should be open for extension, but closed for modification.”[7]

open–closed principle:

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

L

A

Liskov substitution principle:

if you got something that can call f(x),
then f(y) should work if y is a subtype of x

almost common sense really.

A dumber way to say it.
Subtype Requirement: Let {\displaystyle (x)}\phi (x) be a property provable about objects {\displaystyle x}x of type T. Then {\displaystyle \phi (y)}{\displaystyle \phi (y)} should be true for objects {\displaystyle y}y of type S where S is a subtype of T.

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

I

A

interface segregation principle (ISP)

no code should be forced to depend on methods it does not use.

ISP splits interfaces that are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them.

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

D

A

dependency inversion principle:

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