0
0
LLDsystem_design~5 mins

When to use which creational pattern in LLD - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main purpose of the Singleton pattern?
The Singleton pattern ensures a class has only one instance and provides a global point of access to it.
Click to reveal answer
beginner
When should you use the Factory Method pattern?
Use Factory Method when you want to create objects without specifying the exact class, allowing subclasses to decide which class to instantiate.
Click to reveal answer
intermediate
What problem does the Abstract Factory pattern solve?
Abstract Factory provides an interface to create families of related or dependent objects without specifying their concrete classes.
Click to reveal answer
intermediate
When is the Builder pattern most useful?
Builder is useful when constructing complex objects step-by-step, especially when the object has many optional parts or configurations.
Click to reveal answer
intermediate
Why use the Prototype pattern?
Prototype is used to create new objects by copying existing ones, which is helpful when object creation is costly or complex.
Click to reveal answer
Which creational pattern ensures only one instance of a class exists?
ABuilder
BFactory Method
CSingleton
DPrototype
Which pattern is best when you need to create families of related objects without specifying their concrete classes?
AAbstract Factory
BBuilder
CPrototype
DSingleton
When should you use the Builder pattern?
ATo construct complex objects step-by-step
BTo create a single instance globally
CTo clone existing objects
DTo decide which class to instantiate
Which pattern allows subclasses to decide which class to instantiate?
ASingleton
BPrototype
CBuilder
DFactory Method
What is a key benefit of the Prototype pattern?
AEnsures only one instance
BCreates objects by cloning existing ones
CBuilds complex objects step-by-step
DCreates families of related objects
Explain when to use the Singleton, Factory Method, and Builder patterns in simple terms.
Think about controlling instance count, choosing object types, and building complex objects.
You got /3 concepts.
    Describe the difference between Abstract Factory and Prototype patterns and when each is appropriate.
    Focus on object families vs cloning.
    You got /3 concepts.