Advice for refactoring

From: Petterson Mikael (mikael.petterson_at_era.ericsson.se)
Date: 06/28/04


Date: Mon, 28 Jun 2004 15:48:24 +0200

Hi,

I have two classes CardA and CardB that have a lot in common but with
some differences. Since a lot of code is duplicated my task is to remove
and find a solution to handle this.
CardA has implements two interfaces that CardB does not have. CardB
implements one interface that CardB does not have.
I am open to any suggestions, like rule of thumbs, on how to handle this
problem ( naming of classes, patterns....).

BR

//Mikael Petterson



Relevant Pages

  • Re: Advice for refactoring
    ... > I have two classes CardA and CardB that have a lot in common but with ... > CardA has implements two interfaces that CardB does not have. ... Another is to find pieces of common functionality and extract them into ...
    (comp.lang.java.help)
  • Re: Advice for refactoring
    ... > I have two classes CardA and CardB that have a lot in common but with some ... > CardA has implements two interfaces that CardB does not have. ... I would suggest creating a class Card which comprises of the common ...
    (comp.lang.java.help)