I am facing a design issue, where i have to find a suitable design pattern for my small library, which should be easy to understand by the user of my library.
I have a base class and the derived classes from the base class are A,B and C
The requirements consist of the following:
- the User can create an object of type A
- the User can create an object of type B
- The User can create an object that has the type A and B at the same Time
- The user can create an object of type C
- The User can create an object that has the type C and B at the same Time
- The base class can have the type C as well.
I was thikning about using the decorator design pattern, but it seems like i ened up making it look so complex.
So is there any other better design patterns to work with.
Aucun commentaire:
Enregistrer un commentaire