I have this working hierarchy already and the program runs as expected. Basically I have abstracted everything in a Base class and all other subclass adding their own methods.
abstract Class Base{
}
class A extends Base{
//new methods
}
class B extends Base{
//new methods
}
everything looks good until later (errr...new requirements) I realize I need to have a new class (lets call this class C) that extends both class A and B. Now, in java its not possible to extend two concrete class.
class C extends A, B{
//new methods
}
I need both of the methods and variables in class A and class B but I dont know how to do this? Any hints on how do I do this change? I am not that good in design pattern so i thought of asking it here.
Thanks
UPDATE This is actually a JSF Managed Bean wherein I abstracted everything in a Base Managed Bean and all other subclass overriding/adding their own implementations on top of the base managed bean. There is just a new requirement that was added wherein I needed the functionality of both subclasses (A and B) into a new subclass (C)