I have a interface A, a class B that implements the class A, and a class C that extends C.
I want the interface A to have a function compute(List), but instead of having compute(List) in class B and C i would like compute(List) for class B and compute(List)
(because C elements can only compute between each others, as they have more attributes than B)
My first idea is to put an exception in class B/C compute(List) that checks that the A are instance of B/C
Is there a cleaner way to do this without the exception ?