Design Principles Flashcards

1
Q

What is Coupling?

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

What is the difference between High/strong coupling, medium coupling, and low coupling?

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

What does low coupling lead to? What does high coupling lead to?

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

What is cohesion?

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

What is the difference between low cohesion and high cohesion?

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

What is the difference between high coupling/low cohesion and low coupling / high cohesion? Which is more desireable?

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

What does it mean to encapsulate what varies?

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

What is the duck-hunt example of encapsulate what varies?

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

Example of encapsulate what varies:

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

What are the benefits of encapsulating what varies?

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

What does it mean to “Code to and Interface, Not an Implementation”?

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

“Code to an Interface, Not an Implementation” example:

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

What are the benefits of “Code to an Interface, Not an Implementation”?

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

What does it mean to “Favour Composition Over Inheritance”?

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

What kind of relationship does “Favour Composition Over Inheritance” establish? What kind of relationahip does “composition/aggregation” establish?

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

What are the benefits of “Favour Composition Over Inheritance”?

A
17
Q

What is the rule of thumb with “Favour Composition Over Inheritance”?

A
18
Q

What is Composition?

A
19
Q

What is important to note about Composition?

A
20
Q

What is Aggregation? What is the difference between Composition and Aggregation?

A
21
Q

What are the SOLID Design Principles?

A
22
Q

What is the SOLID: Single Responsibility Principle?

A
23
Q

What is a good way to tell that you should be using the SOLID: Single Responsibility Principle?

A
24
Q

What are the benefits of the SOLID: Single Responsibility Principle?

A
25
Q

What is the SOLID: Open/Closed Principle?

A
26
Q

What does it mean for a Class to be Open for extension, but closed for modification?

A
27
Q

Example of the SOLID: Open/Closed Principle

A
28
Q

What are the benefits of the SOLID: Open/Closed Principle?

A
29
Q

What is the SOLID: Liskov Substitution Principle?

A
30
Q

Example of the SOLID: Liskov Substitution Principle

A
31
Q

Go through the ‘class rectangle’ example of the SOLID: Liskov Substitution Principle

A

.

32
Q

What is the SOLID: Interface Segregation Principle?

A
33
Q

Example of the SOLID: Interface Segregation Principle:

A
34
Q

Continued example of the SOLID: Interface Segregation Principle

A
35
Q

What is the bottom line and solution for the SOLID: Interface Segregation Principle?

A
36
Q

What is the SOLID: Dependency Inversion Principle

A
37
Q

SOLID: Dependency Inversion Principle example:

A
38
Q

Continued example of the SOLID: Dependency Inversion Principle. What does it mean for a system to be fragile and rigid?

A