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?