Creational Design Patterns Flashcards
What are the two main goals of creational design patterns?
What is a singleton design pattern?
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.
Go through the logger example of the Singleton design pattern in the slides
.
What is the applicability of the singleton creational design pattern?
What are the consequences of using the singleton design pattern?
What is the Factory Method creational design pattern?
What are the problems withe the factory method creational design pattern?
What is a simple factory? What are its problems?
What is the applicability of the Factory Method creational design pattern?
Example of the Factory Method:
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
What are the consequences of using the factory method creational design pattern?
What is the Abstract Factory creational design pattern?
what is the applicability of the abstract factory creational design pattern?
Abstract factory example
What are the consequences of the abstract factory creational design pattern?
What are the differences between an abstract factory and the factory method?
What is the builder creational design pattern?
What are the following with regards to the builder creational design pattern?
Director
Builder
Concrete Builder
Product
What is the applicability of the builder creational design pattern?
Builder creational design pattern example:
Go over the Pizza Pizza example for the creational design pattern:
What are the consequences of using the builder creational design pattern?
What are the differences between the builder creational design pattern and the abstract factory creational design pattern?
What is the scenario in which we would want to use the prototype creational design pattern?
What is the prototype creational design pattern?
Go over the example of the prototype creational design pattern in the notes
.
What is the applicability of the prototype creational design pattern?
Prototype creational design pattern diagram:
With the Prototype creational design pattern, how would the creation of a video game level happen?
What would the difference be between the Prototype and Abstract Factory creational design patterns when it comes to creating a new video game level?
How would the Prototype and Abstract Factory creational design patterns work in tandem with the example of creating things in a video game?
What are the consequences of using the prototype creational design pattern?