I have some java classes that represent routers types, those classes have similar functions, some of these functions have similar body and located in a father class called Router, other functions have similar signture with different body, other functions are coded separately in each RouterType class, I'm seeing it's a logical error to retype each function in every RouterType class, what is the best design pattern or is there a good pattern to handle this problem? note: every model class have a fragment with the same functionality, it's responsible to view a RouterType settings, so it's another prolem with viewing, hope somebody can give me an answer. thanks in advance
Aucun commentaire:
Enregistrer un commentaire