How I could solve this assignment about Design Patterns in Java

Over time, Santa became more and more tired and one day decided to optimize the work in his workshop. He gathered his three most trusted dwarves and introduced them to the new work process. The process and way of working that Santa described was as follows:

Only two types of toys would be produced in the workshop: “Doll” and “Wheel”. In order not to go to the dwarves every day, Santa bought a magic board on which to write which of the two toys he needed, and the dwarves would follow the board and when they saw the written toy, each dwarf would take the toy from the workshop. . To control the magic board, Santa had to say the magic words “I need dolls” and “I need wheels” and immediately the board would say “Doll” or “Wheel”.

Describe programmatically the new process of working in the workshop. To do this, use the templates Singleton (Santa Claus can be only one), Command, Observer, Abstract factory or Factory method. Objects: Santa Claus, Magic board, I need dolls, I need wheels, Dwarf, Workshop, Doll, Wheel. Some of the conditions are for free interpretation. For example, you can decide for yourself what will happen to the manufactured toys, but the use of templates is mandatory. You have the freedom to make different types of dolls and wheels with matching factories or to add decorators for toys.

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too. Some of what you are asking is pretty trivial in the Free Code Camp context, so you might find that if you’re not getting the instruction and material you need in your current studies, the FCC curriculum will really help you get started. At a modest guess I’d say investing a 4-5 hours working through the curriculum here will really pay off. You can find the curriculum at https://www.freecodecamp.org/learn.

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / repl.it / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.