Alternative Classes With Different Interfaces
Alternative Classes With Different Interfaces
This subtle smell results when differences in the interfaces
of similar classes leads to duplicated code.
If similar classes have differences in their interfaces, clients will differ in how they
interact with each of the classes.If the classes could share a common interface,
clients could work with either class uniformly, thereby removing duplicated client code.
of similar classes leads to duplicated code.
(Reading...)
Formatting Hints:
To format... | use this markup: |
---|---|
source code | {source:lang=java|lineNumbers=false}...{source} (Supported languages: java, cpp, csharp, c, python.) |
bold text | __some text__ |
italicized text | ~~some text~~ |
underlined text | @@some text@@ |
a method or class name | ``myMethod(...)`` |