SOLID Flashcards

1
Q

What does “S” In SOLID stand for?

A

Single responsibility principle

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

What does “O” In SOLID stand for?

A

Open/closed principle

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

What does “L” In SOLID stand for?

A

Liskov substitution principle

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

What does “I” In SOLID stand for?

A

Interface segregation principle

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

What does “D” In SOLID stand for?

A

Dependency inversion principle

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

Define Single responsibility principle

A

A class should have only a single responsibility (i.e. changes to only one part of the software’s specification should be able to affect the specification of the class)

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

Define Open/closed principle

A

“software entities … should be open for extension, but closed for modification.”

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

Define Liskov substitution principle

A

“objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.” See also design by contract

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

Define Interface segregation principle

A

“many client-specific interfaces are better than one general-purpose interface.”

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

Define Dependency inversion principle

A

one should “depend upon abstractions, [not] concretions.”

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

How many design patterns are recognized by the Gang of Four

A

23

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

Name the three categories of the Gang of Four design patterns

A

Creational, Structural, Behavioral

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

Name the 5 Creational Patterns

A

Abstract Factory, Builder, Factory Method, Prototype, Singleton

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

Name the 7 Structural Patterns

A

Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy

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

Name the 11 Behavioral Patterns

A

Chain of responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor

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