I am trying to model a quiz. I create a Quiz object. There are 4 different types of Quiz. Each quiz needs to calculate results...therefore each of the 4 Quiz objects should have a calculate() method. Because each has to have this method, I thought I would create either an abstract class or interface Quiz and have a calculate method that would need to be defined in each of the concrete class. The problem though is that for the calculate methods the parameter passed would be of a different type in certain cases. In 2 cases I want to pass in a List and in another case I pass in a Map object. Since the parameters are different I can't define the method in the superclass, unless in the superclass I define the parameter as Object. Is this the way to go or is this not a case for using inheritance?
Thanks.
Thanks.