+ 1

what is use of builder pattern

Hi I have tried to implement builder pattern https://www.sololearn.com/en/compiler-playground/cwxSQdBnZgRW Is this implementation okay? I still have confusion that this pattern solves what problem? What I have done in builder class can be directly done inside the dog class itself. https://sololearn.com/compiler-playground/cwxSQdBnZgRW/?ref=app

19th Nov 2024, 12:11 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
1 ответ
+ 1
I think it's supposed to be several builder classes with simplified constructors rather than one builder class with complicated constructor... https://refactoring.guru/design-patterns/builder
19th Nov 2024, 2:58 PM
Bob_Li
Bob_Li - avatar