0
C# virtual method that takes decimal vales from inherited class then calculates a total.
I have created a program with serveral classes, employee is the main which the other classes inherent from, the other classes get value decimal for hours work and hourly pay. the method created in employee multiplies hours worked by hourly pay but I don't know how to write this method
1 Antwort
0
if all the inherited class have hours works and hourly pay why not have these in the base class? if not can use override declaration on the method in inherited class to override the employee inplementation so specific for each type of inhereted class.