Skip to content
Sharp

Software Architecture · interview question

How would you explain a common practice to prevent the misuse of a Builder pattern that could lead to incomplete object construction in an interview?

Multiple choiceMediumchapter-13-curatedpremiumsoftware-architecturebuilder-pattern
Choose one answer
Answer and explanation

Correct answer

A. Require mandatory fields in the builder's constructor.

Why

By requiring mandatory fields in the builder's constructor or through dedicated methods, you ensure that the essential data is provided before the object is built, reducing the risk of incomplete construction.

Test yourself on Software Architecture

A free test with instant, explained results. No account needed.

Start free test
All Software Architecture questions →