Don't use plagiarized sources. Get Your Custom Essay on
Problem1 Algorithm Design 10 Points Background Temporary or hourly workers get paid by hours worked. Labor department laws regarding temporary help are below: If hours worked are up to 40 hours or less, then workers salary is hours worked multiplied by hourly pay rate. However, if hours worked exceeds 40 hours, then hours above 40 must be paid by the rate of 1.5 times of regular hourly rate. In addition, employers can withhold social security tax at federally mandated rates. Description of So Write following to Be Writt user defined functions. 1. double getGrossSalary (double hours Worked, double PayRate); This function is called from the main function that already has user data for hours worked and pay rate, inputted by the user. Function applies the algorithm below and returns to the calling block the gross salary If hours worked are up to 40 hours or less, then workers salary is hours worked multiplied by hourly pay rate. However, ifhours worked exceeds 40 hours, then hour.s above 40 must be paid by the rate of 1.5 times of regular hourly rate. 2. double getNetSalary(double grossSalary, double taxRate); Function uses the gross salary determined by the function #1 and a user entered tax rate Function deducts the tax from the gross salary and computes the net salary and returns it to the calling block. THE TWO PICS ARE THE SAME QUESTION Show transcribed image text Problem1 Algorithm Design 10 Points Background Temporary or hourly workers get paid by hours worked. Labor department laws regarding temporary help are below: If hours worked are up to 40 hours or less, then worker's salary is hours worked multiplied by hourly pay rate. However, if hours worked exceeds 40 hours, then hours above 40 must be paid by the rate of 1.5 times of regular hourly rate. In addition, employers can withhold social security tax at federally mandated rates. Description of So Write following to Be Writt user defined functions. 1. double getGrossSalary (double hours Worked, double PayRate); This function is called from the main function that already has user data for hours worked and pay rate, inputted by the user. Function applies the algorithm below and returns to the calling block the gross salary "If hours worked are up to 40 hours or less, then worker's salary is hours worked multiplied by hourly pay rate. However, ifhours worked exceeds 40 hours, then hour.s above 40 must be paid by the rate of 1.5 times of regular hourly rate. 2. double getNetSalary(double grossSalary, double taxRate); Function uses the gross salary determined by the function #1 and a user entered tax rate Function deducts the tax from the gross salary and computes the net salary and returns it to the calling block. Expert Answer Anonymous Anonymous answered this Was this answer helpful? 1 0 123 answers 1. Inputs to be given are hourly pay rate, tax rate , no of hours worked Processing:two functions to getgrosssalary and getNetsalary to find gross salary and net salary respectively Output:GrossSalary,Netsalary 2. Take inputs hourly payrate,hours worked and taxrate function double getgrosssalary if hoursworked40 return 40*payrate + (hoursworked – 40)*1.5*payrate function double netsalary return grosssalary – net tax(i.e taxrate * gross salary) 3. c++ code: #include #include using namespace std; double getGrossSalary(double hoursWorked,double payrate){ if(0…
Get an essay WRITTEN FOR YOU, Plagiarism free, and by an EXPERT!