1. Write a program that calculates gross wages for employees. The program should ask the user to enter an employee’s ID, hours worked and hourly pay rate. It should then calculate the gross wage for that employee and store it with this employee’s information into another file. The program should allow the user to calculate wages as many times as they want. It should use the following functions:
a. void getEmployeeInfor() should ask the user for an employee’s ID, pay rate and the hours worked.
b. double calcWage() should calculate one employee’s gross wage.
c. void printWages should print an employee’s ID, pay rate, hours worked and wage into another file
Input Validation: Do not accept negative values for pay rate and hours worked.
2.Modify Project 4 (Payroll System) so that employees’ information can be sorted by ID, hourly rate, hours worked or wage. You are asked to use a menu to provide these services for the users. The menu might look like this:
Menu
1. Calculate gross wages for employees
2. Display employees’ information to screen
3. Display employee's information to screen according the order of ID
4. Display employee's information to screen according the order of hourly rate
5. Display employee's information to screen according the order of hours worked
6. Display employee's information to screen according the order of wage
7. Quit the system
The requirements for option 1 are same as those for the project 4.