patterns/builder/ #55
Replies: 1 comment 1 reply
-
in Hero's class constructor, how can it access to Builder properties if they are marked as private? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
patterns/builder/
Intent Separate the construction of a complex object from its representation so that the same construction process can create different representations. Explanation Real-world example Imagine a character generator for a role-playing game. The easiest option is to let the computer create the character for you. If you want to manually select the character details like profession, gender, hair color, etc. the character generation becomes a step-by-step process that completes when all the selections are ready.
https://java-design-patterns.com/patterns/builder/
Beta Was this translation helpful? Give feedback.
All reactions