Google for "replace conditional with polymorphism".
Just checked and it is in "Clean Code" - Chaper 17; Section G23 "Prefer Polymorphism to if/else or switch/case".
Google for "replace conditional with polymorphism".
Just checked and it is in "Clean Code" - Chaper 17; Section G23 "Prefer Polymorphism to if/else or switch/case".