mardi 12 mai 2015

Which design pattern to use - Java?

I have three classes, A, B and C that extend from D. There are methods that are common to Class A, B and C which I have put in D where as there are certain methods that are common to A and B, B and C and C and A. I can add in another layer of inheritance i.e create another class E (put common methods for A and B), D (put common methods for B and C) and F (put common methods for C and A) but is there any design pattern relating to this?

Aucun commentaire:

Enregistrer un commentaire