Image may be NSFW.
Clik here to view.
Clik here to view.

I will get right to the point about this pattern. Everyone at some point in their code has a switch statement, that depending on the state of an object, you do some crap and it just looks like this:
1
2
3
4
5
switch(object.getType()){
case Type1:amount=something;break;
case Type2:amount=somethingelse;break;
case Type3:etcetcetc;
}
Not only is this about as ugly as it gets, it makes it utterly useless when it comes to extensibility and have thrown out any hope of it being reusable. This is an example of tightly coupling functionality that varies to the object. Things like this are difficult to manage over time and every time you think of another case, you get to let this beast of a switch statement grow and grow and grow. So how do we avoid something like this?
This is where the Strate