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?

A
17
Q

What is the builder creational design pattern?

A
18
Q

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

A
19
Q

What is the applicability of the builder creational design pattern?

A
20
Q

Builder creational design pattern example:

A
21
Q

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

A
22
Q

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

A
23
Q

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

A
24
Q

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

A
25
Q

What is the prototype creational design pattern?

A
26
Q

Go over the example of the prototype creational design pattern in the notes

A

.

27
Q

What is the applicability of the prototype creational design pattern?

A
28
Q

Prototype creational design pattern diagram:

A
29
Q

With the Prototype creational design pattern, how would the creation of a video game level happen?

A
30
Q

What would the difference be between the Prototype and Abstract Factory creational design patterns when it comes to creating a new video game level?

A
31
Q

How would the Prototype and Abstract Factory creational design patterns work in tandem with the example of creating things in a video game?

A
32
Q

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

A