lundi 21 novembre 2016

How to avoid same implementation of new class which has different class hierarchy

I have Existing C++ class A which has huge implementation.

As per my project requirement I need to create new C++ class B which has all together different class hierarchy. But the implementation of both the classes are exactly the same. So here I want to avoid code duplication for the new as well as old class.

Please anyone suggest me, how would I achieve this by most appropriate design.

Aucun commentaire:

Enregistrer un commentaire