Interpreter: Product Finder Exercise
Introduction
The
ProductFinder
class below has a problem: it has grown to have too many methods for finding products. This is a classic case of the code smell called
A subtle form of duplication, this smell exists when numerous pieces of code do the same thing using different combinations of data or behavior. [Kerievsky 45]
.
(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(...)`` |