/// <summary>
 /// When overriden by the derived classes, this method caclulate the call charges for the given duration
 /// </summary>
 /// <param name="charge">Call charge object that represent charding details for the call</param>
 /// <param name="durationInSeconds">call duration</param>
 /// <returns>call charge</returns>
 protected abstract decimal GetCharegesForTheCall(CallCharge charge, int durationInSeconds);
Esempio n. 2
0
 protected override decimal GetCharegesForTheCall(CallCharge charge, int durationInSeconds)
 {
     return(charge.PerMinuteCharge * (durationInSeconds / 60 + (durationInSeconds % 60 != 0 ? 1 : 0)));
 }
 protected override decimal GetCharegesForTheCall(CallCharge charge, int durationInSeconds)
 {
     return((charge.PerMinuteCharge * durationInSeconds) / 60);
 }