Question: You are working on a simple payroll application for a company that has hourly workers and commission based employees. An hourly worker's pay is based
You are working on a simple payroll application for a company that has hourly workers and commission based employees. An hourly worker's pay is based on the numbers of hours worked (no more than 40 hours) and his/her pay rate (no less than $725). The commission based employee is paid on a base salary, sales total and the agreed upon commission rate. It occurs to you that you know the concept of overloaded methods. Define two methods both named calcPay0. One should be for hourly employees. The function should accept two arguments: hourly rate (validate to not accept greater than 60 hours) and pay rate (Validate to not be less than 7.25). The other should be for commissioned employees. This method should accept three arguments: base salary, totalSales, and commission rate (all doubles). Write the definition for the overloaded functions You do not have to write a complete program. Only write the method defintions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
