Currently, I have the following class design :
AnimalHandler (A base class for all animals)
TigerHandler extends AnimalHandler, LionHandler extends AnimalHandler, LeopardHandler extends AnimalHandler and so on.
TigerHandler, LionHandler, LeopardHandler etc "HAS A" Tiger, Lion, Leopard and so on.
Now the issue is : TigerHandler, LionHandler, LeopardHandler etc are all the same(they have the same methods, etc) except that they deal with Tiger,Lion, Leopard, etc classes respectively. So if I need a new Animal group called Cheetah, I just need to copy any of the (Tiger|Lion|Leopard)Handler and do a search and replace of its "HAS A" class names like Tiger,Lion, Leopard.
Instead of copying/creating a new CheetahHandler as above, is there a way (design) that I can use ? Like, say, a GenericHandler that can deal with any of these "HAS A" classes (like Tiger,Lion, Cheetah, etc).