SpinTheMic
Pro

Interview practice question

Constructor with 12 parameters

Backend Engineering · OOP and Design Patterns · Beginner

A class constructor takes 12 parameters, several optional, and developers keep passing them in the wrong order. What would you do?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Builder pattern.
  • Or parameter object.
  • Named arguments where language supports.
  • Group related params into value objects.
  • Validate in build().
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics