I need help to modify my code according to the instructions:
Modify the program you created in Lab Assignment #9 (Babbage's Cabbage's, Part 3) to include
the following features:
Use parallel arrays to store the full name and gross pay of all employees entered. The size of the
arrays must be easy to change using a single symbolic constant. At the end of the program, after
all the individual employee records have been input and processed, write a summary table to the
report file listing the employees entered and their gross pay amounts. See the sample report that
follows for an example. (Your program may only store these two specific pieces of employee
data in arrays. You will not earn credit for this feature if you create additional arrays for other
pieces of employee data.)
Create individual functions for computing the sum of the gross pay amounts, the average, finding
the maximum gross pay, and the minimum gross pay. Each of these four functions can accept
only the array of gross pay amounts and number of valid data items as parameters, and cannot
depend on the array being arranged in order. Display the total, average, minimum, and maximum
of the gross pay amounts in the report file summary.
Use the optimized version of the Bubble Sort (v.3) so that the summary table of employee names
and gross pay amounts is arranged in descending order by gross pay.
Read input from a data file, rather than the user. See the sample data file that follows for an
example (note that the amount of the transportation deduction is supplied directly). You may
assume that all data provided in the file is valid. Remove all code related to keyboard input and
data validation so that the program simply reads from the data file and writes to the report file
without needing any input from the user.
Sample Report File
Submissions whose programs do not compile without errors, do not use a modular style (i.e., all
of the program code appears in the main module), or contain any of the items listed below, will
receive a grade of zero:
Global variables, Recursive module calls, vectors, structs, or classes, The line using namespace
std; Inclusion of libraries that have not been introduced as part of the class (including those that
are specific to a particular operating system), or use of their commands, Calls to the system
function
This is my code that needs to be modified:
#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
#include <ostream>
#define min_hours 10.0
#define max_hours 55.0
#define min_hourly_rate 15.00
#define max_hourly_rate 65.00
#define overtime_limit 34.0
void input_employee_data(double &hours_worked, double &hourly_wage);
void calculate_gross_pay(double &hours_worked, double &hourly_wage, double& ovt_hours,
double& reg_hours, double &gross_pay);
void calculate_net_pay(double &gross_pay, double& deduct, double &net_pay, double &taxes);
std::string input_full_name(std::string& first_name,
std::string& last_name);
std::string join_names.
I need help to modify my code according to the instructions- Modify th.pdf
1. I need help to modify my code according to the instructions:
Modify the program you created in Lab Assignment #9 (Babbage's Cabbage's, Part 3) to include
the following features:
Use parallel arrays to store the full name and gross pay of all employees entered. The size of the
arrays must be easy to change using a single symbolic constant. At the end of the program, after
all the individual employee records have been input and processed, write a summary table to the
report file listing the employees entered and their gross pay amounts. See the sample report that
follows for an example. (Your program may only store these two specific pieces of employee
data in arrays. You will not earn credit for this feature if you create additional arrays for other
pieces of employee data.)
Create individual functions for computing the sum of the gross pay amounts, the average, finding
the maximum gross pay, and the minimum gross pay. Each of these four functions can accept
only the array of gross pay amounts and number of valid data items as parameters, and cannot
depend on the array being arranged in order. Display the total, average, minimum, and maximum
of the gross pay amounts in the report file summary.
Use the optimized version of the Bubble Sort (v.3) so that the summary table of employee names
and gross pay amounts is arranged in descending order by gross pay.
Read input from a data file, rather than the user. See the sample data file that follows for an
example (note that the amount of the transportation deduction is supplied directly). You may
assume that all data provided in the file is valid. Remove all code related to keyboard input and
data validation so that the program simply reads from the data file and writes to the report file
without needing any input from the user.
Sample Report File
Submissions whose programs do not compile without errors, do not use a modular style (i.e., all
of the program code appears in the main module), or contain any of the items listed below, will
receive a grade of zero:
Global variables, Recursive module calls, vectors, structs, or classes, The line using namespace
std; Inclusion of libraries that have not been introduced as part of the class (including those that
are specific to a particular operating system), or use of their commands, Calls to the system
function
This is my code that needs to be modified:
#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
#include <ostream>