Write a program that calculates and outputs the monthly paycheck information for
ID: 3633067 • Letter: W
Question
Write a program that calculates and outputs the monthly paycheck information for an employee, including all the amounts deducted from an employee’s gross pay, and the net pay that is due to the employee. The user of your program will know the employee’s name and the gross pay, marital status and number of children for the employee. Each employee has the following deductions taken from his gross pay:Income Tax: 5% if single and 3% if married
Social Security 2%
Health Insurance $50 if single, $80 if married no children, $100 for married up to children and $130 if 3 or more children
Your program should deal with erroneous input values. Gross salary should always be a positive number.
1. Identify the inputs and outputs of the problem.
2. Identify the processing needed to convert the inputs to the outputs.
3. Design an algorithm in pseudocode to solve the problem. Make sure to include steps to get each input and to report each output. Include steps to deal with error cases.
4. Identify two test cases, one using a positive number, and one using a negative number. For each of the two test cases show what inputs you will use and what your expected outputs should be.
5. Write the program to implement your algorithm. Test your program using your test cases.
Explanation / Answer
LEASE RATE #include #include using namespace std; int main() { double grossPay; double FedralTax; double StateTax; double Social_midCare; double HealthInsurance; string name; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.