Intermediate

Design Patterns Questions

Coding Principles
10 questions

Question 1

Which principle of object-oriented design does the Builder Pattern primarily promote?

Question 2

In the Builder Pattern, what is the product?

Question 3

What could be a potential drawback of using the Flyweight pattern?

Question 4

How does the Builder Pattern differ from using telescoping constructors?

Question 5

What is the primary goal of the Flyweight pattern?

Question 6

What type of relationship does the Composite pattern leverage to represent the parent-child structure?

Question 7

How does the State Pattern typically handle state transitions?

Question 8

What is a key advantage of using a 'Flyweight Factory' in the pattern?

Question 9

How does the State Pattern differ from a simple switch statement for managing state?

Question 10

Which of these is NOT a common use case for the Prototype Pattern?