chapter 2 Flashcards

(5 cards)

1
Q

Qu’est-ce que le principe S de SOLID?

A

S = Single Responsibility: Every function/class should do one thing only—not too many jobs, keep it simple!

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

Que veut dire le O de SOLID?

A

O = Open/Closed: Your code should be open for extension, but closed for modification. Add new stuff without breaking the old!

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

Le L de SOLID signifie quoi?

A

L = Liskov Substitution: Subclasses must work like the parent classes. Don’t break stuff when you swap them!

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

I de SOLID?

A

I = Interface Segregation: Don’t force classes to implement stuff they don’t need. Just give them the interfaces they actually use.

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

D de SOLID?

A

D = Dependency Inversion: Depend on abstractions, not concrete stuff. This way, your code is flexible and modular.

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