Question: Visual Studio: Create a program that calculates and displays (to 2 places of decimal) the weekly gross pay of hourly employees and salaried employees. The
Visual Studio:
Create a program that calculates and displays (to 2 places of decimal) the weekly gross pay of hourly employees and salaried employees. The weekly gross pay of a salaried employee is calculated by dividing the employees annual salary by 52. The weekly gross pay of an Hourly employee is calculated by multiplying the number of hours worked by the pay rate. Create two separate functions (one each for the Hourly employees and the Salaried employees) as follows: For the Hourly employee function, prompt for two values (hours worked and pay rate), and pass them to the function For the Salaried employee function, prompt for one value (yearly salary), and pass it to the function. Continue to request, calculate and display employee information until there is no more employee data to process. Your program must be able to process zero employees, to an infinite number of employees. Demonstrate the use of the following in your solution: Iteration (Looping) Modularity (using functions) Function Overloading (use overloaded functions for calculating Gross Pay) Pass-by-Reference using Reference arguments (show, at least, one example of using Pass-by-Reference using Reference argument with each of the overloaded functions) Function Prototyping (create a function prototype for each of the overloaded functions) 2 Your program, depending on the argument(s) supplied by the user, should invoke the appropriate overloaded function. Except for the number of weeks in a year (52), there must be no hardcoded input in your program.
Please make sure the program works.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
