---
title: "Alternative Classes with Different Interfaces"
type: "code-smell"
slug: "alternative-classes-with-different-interfaces"
url: "http://localhost:3000/en/smells/alternative-classes-with-different-interfaces.md"
category: "Object-Orientation Abusers"
description: "Two classes perform identical functions but have different method names."
---
# 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).
## Relations

**Treated by**

- [Rename Method](/en/rename-method.md)
- [Move Method](/en/move-method.md)
- [Add Parameter](/en/add-parameter.md)
- [Parameterize Method](/en/parameterize-method.md)
- [Extract Superclass](/en/extract-superclass.md)

