- What are design patterns?
- They are common patterns, implementations, and rationales for solving software challenges.
- Why are design patterns helpful?
- They can help us discuss solutions to software challenges using common language and context, and they help implement solutions to those same challenges.
- What is the benefit of the Singleton pattern?
- It ensures that only a single instance of some object exists within an application.
- What is the purpose of the Factory pattern?
- To control how instances of classes are instantiated
- What two Kotlin language features simplify the implementation of the Builder pattern?
- Named arguments
- Default parameter values
- What is the Strategy pattern?
- It encapsulates the key logic and decisions of a larger algorithm so the algorithm can be made more flexible by allowing different behaviors to be substituted via different strategies.