I have a doubt in Inheritance
1,I have a common class named - commonIt has 3 child classes child1,child2,child32, I have a common class named - stateIt has 3 child classes state1, state2, state3I have a function named xyz() in all the 3 childclasses of common, which I want to move to the parent class common.The function xyz( ) in child1 uses state1 class inside the function, creates object for state1 class.The function xyz( ) in child2 uses state2 class and creates object for state2 class.The function xyz( ) in child3 uses state3 class and creates object for state3 class.But the procedure is same in all the function xyz()of the 3 childclasses, the only difference is usage of classes state1, state2, state3.In this case how can I put that xyz()function in parent class.so that all the 3 child classes can access the function from the parent class...Is it necessary that I have to use Generic Inheritance....could anybody throw some light on it?