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?