ABOUT! I understood. I looked at the Wikipedia example and realized why Builder is useful. This is useful when the client does not know what arguments are passed to the constructor, since it is very complex and, therefore, cannot directly call the constructor and get the object. Therefore, he asks for help from the Concrete Builders, who know what arguments are passed to the constructors and, therefore, get the created object.
In principle, if the client is the one who is basically going to pass arguments to the constructor of the class whose object is created, then Builder is not so useful. It might be better to use a prototype. On the other hand, if there is a small finite set of specific objects that can be created from a class, passing arguments to the constructor (or calling setters) of this class, and if they are the ones that are often used, then it is better to encapsulate this argument passed to Builder class, and use them to create objects for you.
user855
source share