THE TWO PICS ARE THE SAME QUESTION
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.