private int computeEmpWage(CompanyEmpWage companyEmpWage) { //variables int empHrs = 0, totalEmpHrs = 0, totalWorkingDays = 0; //computation while (totalEmpHrs <= companyEmpWage.maxHoursPerMonth && totalWorkingDays < companyEmpWage.numOfWorkingDays) { totalWorkingDays++; Random random = new Random(); int empCheck = random.Next(0, 3); switch (empCheck) { case IS_PART_TIME: empHrs = 4; break; case IS_FULL_TIME: empHrs = 8; break; default: empHrs = 0; break; } totalEmpHrs += empHrs; Console.WriteLine("Days#: " + totalWorkingDays + " Emp Hrs : " + empHrs); } return(totalEmpHrs * companyEmpWage.empRatePerHour); }
public void addCompanyEmpWage(string company, int empRatePerHour, int numOfWorkingDays, int maxHoursPerMnth) { CompanyEmpWage companyEmpWage = new CompanyEmpWage(company, empRatePerHour, numOfWorkingDays, maxHoursPerMnth); this.companyEmpWagesList.AddLast(companyEmpWage); this.companyToEmpWageMap.Add(company, companyEmpWage); }