Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

calculates each employee’s weekly gross pay, Social Security and Medicare (FICA)

ID: 3624909 • Letter: C

Question

calculates each employee’s weekly gross pay, Social Security and Medicare (FICA) tax, federal withholding tax (FWT), and net pay – a time – consuming process and one that prone to mathematical errors. Mr. Ali has asked you to create an application that performs the payroll calculations both efficiently and accurately.
All employees are paid on an hourly basis, with time and one-half paid for the hours worked over 40. The amount of FICA tax to deduct from an employee’s weekly gross pay is calculated by multiplying the gross pay amount by 7.65%. The amount of FWT to deduct from an employee’s weekly gross pay is based on the employee’s filling status. First, if employee is single with no kids, the amount of FWT to deduct from the employee’s weekly gross pay is calculated by multiplying the gross pay amount by 18.5%. Second, if employee is single with kids, the amount of FWT to deduct from the employee’s weekly gross pay is calculated by multiplying the gross pay amount by 12.5%. Third, if employee is married with no kids, the amount of FWT to deduct from the employee’s weekly gross pay is calculated by multiplying the gross pay amount by 15.5%. And finally, if employee is married with kids, the amount of FWT to deduct from the employee’s weekly gross pay is calculated by multiplying the gross pay amount by 8.5%.
Calculate and display the employee’s ID, employee’s name, gross pay, taxes, and net pay. Repeat the same procedure until the user entered (999) for employee’s ID to end

Please do it step by step < i have a couples replies from others member but still errors

thanks

Explanation / Answer

Not sure about the input and if error checking is needed but here goes, #include #include #include using namespace std; int main(){ const int OT = 40; // begins overtime pay const float FICA = 0.0765; // Social Security Medicare const float FWT_snk = 0.185; // Single no kids const float FWT_swk = 0.125; // Single with kids const float FWT_mnk = 0.155; // Married no kids const float FWT_mwk = 0.085; // Married with kids int hours; // hours worked int empID; // employee ID float wage; // hourly wage float ficaTax, fwtTax, totalTax; // taxes float gross; // amount before taxes float net; // amount after taxes char status, kids; // status with kids string name; // employee name cout > empID; while(empID != 999){ cin.ignore(1000, ' '); // get user input cout hours; cout > wage; cout > status; cout > kids; // calculate gross pay without overtime gross = 40 * wage; // add overtime pay if required if(hours > OT) gross += (hours - OT) * wage * 1.5; // calculate fica tax ficaTax = gross * FICA; // calculate tax based on status if(status == 's' && kids == 'n') fwtTax = gross * FWT_snk; else if(status == 's' && kids == 'y') fwtTax = gross * FWT_swk; else if(status == 'm' && kids == 'n') fwtTax = gross * FWT_mnk; else if(status == 'm' && kids == 'y') fwtTax = gross * FWT_mwk; // total taxes totalTax = ficaTax + fwtTax; // output employee data cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote