Question: Complete the following C++ program by including the definition for the function named calcNetPay that returns weekly pay in currency format. The function has the

Complete the following C++ program by including the definition for the function named calcNetPay that returns weekly pay in currency format. The function has the formal parameter hours to pass the value of the number of hours worked in a week and the formal parameter rate to pass the value of the hourly rate.

*;Deductions:

o Assume a FIT rate of 10%

o Assume a SS tax rate of 6.2%

o Assume a Medicare tax rate of 1.45%

o Assume No deductions for Health or Dental

o Do not worry about adding an Overtime handling element to the function at this time.

Output the name of the paycheck reciepient next to their pay. Using All CAPS

*;Do indeed display the number in currency format ($ in front, and precision of 2 decimal places after the decimal)

*;Add 2 additional function calls to the program passing the following parameters in the main functions body (in a cout statement):

o hours: 39, rate: 125, name: YourName

o hours: 39, rate: 65.78, Caleb o hours: 39, rate: 75.75, Alejandra

#include #include #include //add respective library for handling all CAPS using namespace std;

double getNetPay(double, double,string);// function prototype

int main ( ) {

double clockedHours = 32.5, hourlyRate = 55.25; cout << getNetPay (clockedHours, hourlyRate, "dr.t") << endl; system("pause");

return 0;

}

double getNetPay(double hours, double rate, string name)

{ // complete the function definition

//return the weekly pay number (variable) here

return 0.0;

}

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!