ConstructiCat Logo
CodeBust.
Browse section ▾

Alternative Classes with Different Interfaces.

Two classes perform identical functions but have different method names.

##Signs and Symptoms

Two classes perform identical functions but have different method names.

##Reasons for the Problem

The programmer who created one of the classes probably didn’t know that a functionally equivalent class already existed.

##Payoff

  • You get rid of unnecessary duplicated code, making the resulting code less bulky.

  • Code becomes more readable and understandable (you no longer have to guess the reason for creation of a second class performing the exact same functions as the first one).