A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can overrude.What is the correct implementation of the ShippingCalculator class?
选项:
A:public abstract class ShippingCalculator{ public abstract calculate(){ /*implementation*/}}
B:public abstract class ShippingCalculator{ public void calculate(){ /*implementation*/}}
C:public abstract class ShippingCalculator{ public virtual void calculate(){ /*implementation*/}}
D:public abstract class ShippingCalculator{ public override calculate(){ /*implementation*/}}
发布时间:2024-06-05 09:42:01