示例#1
0
        public void addCompanyEmpwage(string company, int empRatePerHour, int numOfWorkingDays, int maxHoursPerMonth)
        {
            CompanyEmpwage companyEmpwage = new CompanyEmpwage(company, empRatePerHour, numOfWorkingDays, maxHoursPerMonth);

            this.companyEmpWageList.AddLast(companyEmpwage);
            this.companyToEmpwageMap.Add(company, companyEmpwage);
        }
示例#2
0
        /// <summary>
        /// Computes the empwage.
        /// </summary>
        /// <param name="companyEmpwage">The company empwage.</param>
        /// <returns></returns>

        public int computeEmpwage(CompanyEmpwage companyEmpwage)
        {
            while (totalWorkDays < companyEmpwage.numOfWorkingDays && totalempHours < companyEmpwage.maxHoursPerMonth)
            {
                totalWorkDays++;
                totalempHours += GetEmpHrs();
                Console.WriteLine("Day#:" + totalWorkDays + "Emp hrs" + GetEmpHrs());
            }
            totalSalary = companyEmpwage.empRatePerHour * totalempHours;
            return(totalSalary);
        }