abstract method

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I have class1 and class2. When I inherit from class1 or class2, I want to
have to implement a method called MyMethod(). If this was my only
requirement, I'd make MyMethod and abstract method in both class1 and
class2.

However, class2 also needs to inherit from class1. Hence, class2 has to
have some implementation of MyMethod(). I believe I won't be able to make
it abstract in class2 since it's supposed to implement all abstract methods
from Class1.

What's the best way to go about this?

Thanks in advance.

Mark
 
Back
Top