That's what the section "Using Factories" is for. This is just an example class because I did not want to copy it three times. The class on its own does not work of course, it's just for explaining stuff...