jeudi 26 novembre 2015

Java creating patterns

I have 7 classes that extends one parent abstract class. Also I have 7 classes that match first classes. I want to create one object of second classes depending on class first object. Which pattern I should use. I think about factory, but sometimes I need to add new classes and there are many of factories. So when I want to add new class I have to add it to all factories.

Sanks for any suggestions.

Aucun commentaire:

Enregistrer un commentaire