samedi 20 décembre 2014

What design pattern for changing interface?


Say I have the abstract class Father, and three(or more) of his children class Son1, Son2 and Son3. Now I have to change one method, in other words, add an argument to one method of Father. However, I will have to change all the inherited methods in SonX, which costs too much.


So my question is: is there any design pattern suitable for such a situation in which the interfaces will change?


Thanks.





Aucun commentaire:

Enregistrer un commentaire