← Quiz: Design Patterns: all 10 questions
Quiz: Design Patterns · Question 10 of 10
An object has many optional fields, and a constructor with ten parameters is hard to read. Which pattern helps?
An object has many optional fields, and a constructor with ten parameters is hard to read. Which pattern helps?
- A.Observer
- B.Adapter
- C.Builder
- D.Strategy
Answer & explanation
Correct answer: Builder
A builder sets the parts one by one, often with chained calls, then builds the object.
Can you get the rest right without peeking?
Take the timed Quiz: Design Patterns quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →