Find out how to design secondary configuration classes for initialization parameters instead. When the number of configuration parameters for a component is large, there can be a combinatorial explosion in constructors, ultimately leading to a malady known as constructor madness. As an alternative to implementing constructors to accommodate all possible start-up configurations, this tip illustrates the use of a supporting configuration class. There is no suggestion here to limit access methods.
Access methods are a basic design component for object-oriented programming.
In the case of instance creation, however, post-hoc initialization can be cumbersome. For this reason, it's common to provide a variety of constructors. Of course, it's possible to provide one monster constructor with a parameter for each configuration option. In general, providing this type of reference constructor is a good idea. With eight configurations options, however, the number of convenience constructors necessary to support common configuration scenarios is large.