a) A company’s employees are treated as either salaried or waged. A salaried employee has an annual salary and is payed monthly. A waged employee is paid an hourly rate and works up to a maximum of 50 hours per week. Both types of employee have an annual tax free allowance and a tax rate of 45%. Write a program that calculates and displays either the employee’s net monthly salary or net weekly wage as appropriate. The program should first ask an employee to enter S or W to indicate his employee type (Salaried or Waged). On entry of employee type, the program should then ask for the necessary additional information required to calculate and display the employee’s net pay.
b) Extend your solution to part a) to allow for overtime to be paid to waged employees for hours worked over 50 hours at 2.0 times the hourly rate.