ksfok
asked on
Java OOP Extending Classes and Inheritance
Given an abstract ItemBase class, two subclasses A and B are extended from it with methods specific to each one. For example:
ItemBase has generic method V, W
subclass A has specfic method X
subclass B has specfic method Y
How can the above design be implemented so that ItemBase be used as an Array that contains objects of A or B calling their individual method X or Y? Can methods X and Y be omitted in Itembase or should they be defined in it? How?
Thanks for any help.
ItemBase has generic method V, W
subclass A has specfic method X
subclass B has specfic method Y
How can the above design be implemented so that ItemBase be used as an Array that contains objects of A or B calling their individual method X or Y? Can methods X and Y be omitted in Itembase or should they be defined in it? How?
Thanks for any help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks much.