Question: need help finish a C++ code this is what a have so far #include #include #include #include using namespace std; ofstream print(salary.out); ifstream ins(salary.txt); //prototype

need help finish a C++ code this is what a have soneed help finish a C++ code

this is what a have so far

#include #include #include #include using namespace std;

ofstream print("salary.out"); ifstream ins("salary.txt");

//prototype function declaration void display_heading(); void read_data(string&, double&); void compute_salary(double, double&, double&, double&); void display_result(string, double, double, double, double);

void find_max(string, double, string&, double&); void find_min(string, double, string&, double&); void display_max(string, double); void display_min(string, double);

int main() { string name, maxname, minname;

double salary, tax_paid, hours, net_pay, max_pay=-9, min_pay=99999.; display_heading();

//employee One read_data( name, hours); compute_salary( hours, salary, tax_paid, net_pay); display_result(name, hours, salary, tax_paid, net_pay); find_max(name, net_pay, maxname, max_pay); find_min(name, net_pay, minname, min_pay); //employee Two read_data( name, hours); compute_salary( hours, salary, tax_paid, net_pay); display_result(name, hours, salary, tax_paid, net_pay); find_max(name, net_pay, maxname, max_pay); find_min(name, net_pay, minname, min_pay); //employee Three read_data( name, hours); compute_salary( hours, salary, tax_paid, net_pay); display_result(name, hours, salary, tax_paid, net_pay); find_max(name, net_pay, maxname, max_pay); find_min(name, net_pay, minname, min_pay); display_max(maxname, max_pay); display_min(minname, min_pay);

//employee four read_data( name, hours); compute_salary( hours, salary, tax_paid, net_pay); display_result(name, hours, salary, tax_paid, net_pay); find_max(name, net_pay, maxname, max_pay); find_min(name, net_pay, minname, min_pay);

ins.close(); print.close(); cout

- Write a program, which accepts name and number of hours worked per week of an employee and computes weekly salary of the employee. The program, also, calculates income tax (15%) and net wage of the employee. The rate per hour over 40 is one and half times the normal rate ($10/ hour ). The program will display the highest and lowest salary holder's record. Your program will produce an output file named salaryEmp.txt. - read data compute salary, show result. - read data will accept name and hours worked - compute salary computes weekly salary, income tax paid, and net wage: - show result will display name, hours, salary, tax paid, and net wage of the employee in a table. - The program will use a data file as shown below: - Sample output of the program is: Ronnie Zamora is holding the largest salary of 40375 Rudy Miller is holding the lowest salary of 127.50 Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!