public void SetHourlyRates(int rateStart, int rateEnd, int rate) { List <int> hours = HoursHelper.CalculateHoursRange(rateStart, rateEnd); foreach (int hour in hours) { HourlyRates[hour] = rate; } }
public int CalculatePay(FamilyRate rate) { List <int> workedHours = HoursHelper.CalculateHoursRange(FirstHour, LastHour); int pay = 0; foreach (int hour in workedHours) { pay += rate.HourlyRates[hour]; } return(pay); }
public int CalculatePay(int shiftStart, int shiftEnd, FamilyRate rate) { List <int> workedHours = HoursHelper.CalculateHoursRange(shiftStart, shiftEnd); ValidateWorkedHours(workedHours); int pay = 0; foreach (int hour in workedHours) { pay += rate.HourlyRates[hour]; } return(pay); }
public Shift(int shiftStart, int shiftEnd) { shiftHours = HoursHelper.CalculateHoursRange(shiftStart, shiftEnd); FirstHour = shiftStart; LastHour = shiftEnd; }