Creational Design Patterns Flashcards

1
Q

What are the two main goals of creational design patterns?

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

What is a singleton design pattern?

A

Singleton is a creational design pattern that lets you ensure that a class has only one instance, while providing a global access point to this instance.

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

Go through the logger example of the Singleton design pattern in the slides

A

.

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

What is the applicability of the singleton creational design pattern?

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

What are the consequences of using the singleton design pattern?

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

What is the Factory Method creational design pattern?

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

What are the problems withe the factory method creational design pattern?

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

What is a simple factory? What are its problems?

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

What is the applicability of the Factory Method creational design pattern?

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

Example of the Factory Method:

A

The factory method is solution 2, with a twist
* createMonster function is protected
* FireGameLevel and IceGameLevel will overload it
* Will change the monsters used in the GameLevel

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

What are the consequences of using the factory method creational design pattern?

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

What is the Abstract Factory creational design pattern?

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

what is the applicability of the abstract factory creational design pattern?

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

Abstract factory example

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

What are the consequences of the abstract factory creational design pattern?

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

What are the differences between an abstract factory and the factory method?

17
Q

What is the builder creational design pattern?

18
Q

What are the following with regards to the builder creational design pattern?
Director
Builder
Concrete Builder
Product

19
Q

What is the applicability of the builder creational design pattern?

20
Q

Builder creational design pattern example:

21
Q

Go over the Pizza Pizza example for the creational design pattern:

22
Q

What are the consequences of using the builder creational design pattern?

23
Q

What are the differences between the builder creational design pattern and the abstract factory creational design pattern?

24
Q

What is the scenario in which we would want to use the prototype creational design pattern?

25
What is the prototype creational design pattern?
26
Go over the example of the prototype creational design pattern in the notes
.
27
What is the applicability of the prototype creational design pattern?
28
Prototype creational design pattern diagram:
29
With the Prototype creational design pattern, how would the creation of a video game level happen?
30
What would the difference be between the Prototype and Abstract Factory creational design patterns when it comes to creating a new video game level?
31
How would the Prototype and Abstract Factory creational design patterns work in tandem with the example of creating things in a video game?
32
What are the consequences of using the prototype creational design pattern?