Pattern Identification

You need to construct a complex configuration object that has 15+ optional parameters, many with default values, and certain combinations that are invalid. Which pattern most directly addresses this construction problem?

A

Factory Method: let subclasses decide which configuration to instantiate

B

Abstract Factory: create a factory that returns pre-configured objects for each valid combination

C

Prototype: create a default configuration and clone/modify it for each variant

D

Builder: construct the object step-by-step with validation, separating construction from representation