List of variables:
working_hours: Store the working hours for the employees.( Taken as 7 hours)
dependents: Store the number of dependents.
regular_hours: Store the number of regular hours.
Total_income: To store the total income.
List of functions used:
cin(): To take input from input streams like keyboard, files etc.
cout(): To display the output.
Summary Introduction:
Program Description:
The purpose of the program is to find the worker’s gross pay, each withholding amount and the net take-home payfor the week.
Trending nowThis is a popular solution!
Chapter 1 Solutions
Absolute C++, Student Value Edition, 6/e
- Employees of KB and SONS Consultants Limited are paid at an hourly basics of 25GHS per an hour for regular hours and 1.5 times per hour for overtime hours in a week. Any hour worked over 40 hours per week is overtime. The following national tax sliding scale is then applied to determine the amount of tax to be paid by an employee. GrossWage Tax Rate (%) First 125 0 Next 125 5 Next 1500 10 Next 2750 15 Next 1250 20 Excess over 5000 30 In addition 6% of an employee’s gross wage is withheld for Social Security, 3% is withheld as constituency tax and 20GHS is withheld by the employer as welfare contribution. If an employee has more than 3 dependants then an amount of 5GHS for each dependant in excess of three towards NHIS. You are required to write a program that compute a workers gross pay, the deductions and his/her net pay. Your program should allow details of the staff to be accept /input into the system for the necessary computations. Try using comments in explaining the flow of the…arrow_forwardYou found an exciting summer job for five weeks. It pays, say, $15.50 per hour. Suppose that the total tax you pay on your summer job income is 14%. After paying the taxes, you spend 10% of your net income to buy new clothes and other accessories for the next school year and 1% to buy school supplies. After buying clothes and school supplies, you use 25% of the remaining money to buy savings bonds. For each dollar you spend to buy savings bonds, your parents spend $0.50 to buy additional savings bonds for you. Instructions Write a program that prompts the user to enter: The pay rate for an hour and the number of hours you worked each week. The program then outputs the following: Your income before and after taxes from your summer job. The money you spend on clothes and other accessories. The money you spend on school supplies. The money you spend to buy savings bonds. The money your parents spend to buy additional savings bonds for you.arrow_forwardYou found an exciting summer job for five weeks. It pays, say, $15.50 per hour. Suppose that the total tax you pay on your summer job income is 14%. After paying the taxes, you spend 10% of your net income to buy new clothes and other accessories for the next school year and 1% to buy school supplies. After buying clothes and school supplies, you use 25% of the remaining money to buy savings bonds. For each dollar you spend to buy savings bonds, your parents spend $0.50 to buy additional savings bonds for you. Instructions Write a program that prompts the user to enter: The pay rate for an hour and the number of hours you worked each week. The program then outputs the following: Your income before and after taxes from your summer job. The money you spend on clothes and other accessories. The money you spend on school supplies. The money you spend to buy savings bonds. The money your parents spend to buy additional savings bonds for you. I try this code cengage…arrow_forward
- You found an exciting summer job for five weeks. It pays, say, $15.50 per hour. Suppose that the total tax you pay on your summer job income is 14%. After paying the taxes, you spend 10% of your net income to buy new clothes and other accessories for the next school year and 1% to buy school supplies. After buying clothes and school supplies, you use 25% of the remaining money to buy savings bonds. For each dollar you spend to buy savings bonds, your parents spend $0.50 to buy additional savings bonds for you. Write a program that prompts the user to enter the pay rate for an hour and the number of hours you worked each week. The program then outputs the following:a. Your income before and after taxes from your summer job.b. The money you spend on clothes and other accessories.c. The money you spend on school supplies.d. The money you spend to buy savings bonds.e. The money your parents spend to buy additional savings bonds for you. Write pseudocode, flowchart, and corresponding C++…arrow_forwardYou found an exciting summer job for five weeks. It pays, say, $15.50 per hour. Suppose that the total tax you pay on your summer job income is 14%. After paying the taxes, you spend 10% of your net income to buy new clothes and other accessories for the next school year and 1% to buy school supplies. After buying clothes and school supplies, you use 25% of the remaining money to buy savings bonds. For each dollar you spend to buy savings bonds, your parents spend $0.50 to buy additional savings bonds for you. Write a program that prompts the user to enter the pay rate for an hour and the number of hours you worked each week. The program then outputs the following:a. Your income before and after taxes from your summer job.b. The money you spend on clothes and other accessories.c. The money you spend on school supplies.d. The money you spend to buy savings bonds.e. The money your parents spend to buy additional savings bonds for you.arrow_forwardThere are three financial aid counselors. If a student’s last initial is from A – H, let them know that their counselor is Jon Stewart. If a student’s last initial is from I – Q, let them know that their counselor is Chelsea Handler. If a student’s last initial is from R – Z, let them know that their counselor is Brian Williams.Ask student for the FICO score, if it’s less than 660 tell that this student cannot have a loan. c++arrow_forward
- Helen earns $7.50 an hour at her job, but if she works more than 35 hours in a week, she is paid 1.5 times her regular salary for the overtime hours worked. One week her gross pay was $352.50. How many overtime hours did she work that week?arrow_forwardHOMEPRO is a furniture manufacturer which produces two sizes of wood blocks (type A and B) thatare used to make either a table or a chair. A table is made of a type A and a type B wood blocks,while a chair is made of a type A and two type B wood blocks (See Figure 1) A table makes RM 3 profit, and a chair makes RM 5 profit. If M number of type A and Nnumber of type B wood blocks are produced, how many tables and chairs should themanufacturer make to obtain the greatest profit?For example, let M = 12 and N = 12.By making 4 tables (4 type A and 4 type B) and 4 chairs (4 type A and 8 type B), themanufacturer gain profit as follows,Profit = (RM 3) × 4 + (RM 5) × 4 = RM 32.If the manufacturer makes 2 more tables and 1 less chair, the profit will be increased as follows,Profit = (RM 3) × 6 + (RM 5) × 3 = RM 33.Is this the greatest profit? Write a complete C++ program to help the manufacturer determine the greatest profit obtainfrom making tables and chairs with a given number of M type A and…arrow_forwardSuppose, you are working in a company ‘X’ where your job is to calculate the profit based on their investment.If the company invests 100,000 USD or less, their profit will be based on 75,000 USD as first 25,000 USD goes to set up the business in the first place. For the first 100,000 USD, the profit margin is low: 4.5%. Therefore, for every 100 dollar they spend, they get a profitof 4.5 dollar.For an investment greater than 100,000 USD, for the first 100,000 USD (actually on 75,000 USD as 25,000 is the setup cost), the profit margin is 4.5% where for the rest, it goes up to 8%. For example, if they invest 250,000 USD, they will get an 8% profit for the 150,000 USD. In addition, from the rest 100,000 USD, 25,000 is the setup cost and there will be a 4.5% profit on the rest 75,000. Investment will always be greater or equal to 25,000 and multiple of 100.Complete the RECURSIVE methods below that take an array of integers (investments)and an iterator (always sets to ZERO(‘0’) when the…arrow_forward
- [Very Hard] Suppose, you are working in a company ‘X’ where your job is to calculate the profit based on their investment. If the company invests 100,000 USD or less, their profit will be based on 75,000 USD as first 25,000 USD goes to set up the business in the first place. For the first 100,000 USD, the profit margin is low: 4.5%. Therefore, for every 100 dollar they spend, they get a profit of 4.5 dollar. For an investment greater than 100,000 USD, for the first 100,000 USD (actually on 75,000 USD as 25,000 is the setup cost), the profit margin is 4.5% where for the rest, it goes up to 8%. For example, if they invest 250,000 USD, they will get an 8% profit for the 150,000 USD. In addition, from the rest 100,000 USD, 25,000 is the setup cost and there will be a 4.5% profit on the rest 75,000. Investment will always be greater or equal to 25,000 and multiple of 100. Complete the RECURSIVE methods below that take an array of integers (investments) and an iterator (always…arrow_forwardSuppose, you are working in a company ‘X’ where your job is to calculate the profit based on their investment. If the company invests 100,000 USD or less, their profit will be based on 75,000 USD as first 25,000 USD goes to set up the business in the first place. For the first 100,000 USD, the profit margin is low: 4.5%. Therefore, for every 100 dollar they spend, they get a profit of 4.5 dollar. For an investment greater than 100,000 USD, for the first 100,000 USD (actually on 75,000 USD as 25,000 is the setup cost), the profit margin is 4.5% where for the rest, it goes up to 8%. For example, if they invest 250,000 USD, they will get an 8% profit for the 150,000 USD. In addition, from the rest 100,000 USD, 25,000 is the setup cost and there will be a 4.5% profit on the rest 75,000. Investment will always be greater or equal to 25,000 and multiple of 100. Complete the RECURSIVE methods below that take an array of integers (investments) and an iterator (always sets to…arrow_forwardSuppose, you are working in a company ‘X’ where your job is to calculate the profit based on their investment. If the company invests 100,000 USD or less, their profit will be based on 75,000 USD as first 25,000 USD goes to set up the business in the first place. For the first 100,000 USD, the profit margin is low: 4.5%. Therefore, for every 100 dollar they spend, they get a profit of 4.5 dollar. For an investment greater than 100,000 USD, for the first 100,000 USD (actually on 75,000 USD as 25,000 is the setup cost), the profit margin is 4.5% whereas for the rest, it goes up to 8%. For example, if they invest 250,000 USD, they will get an 8% profit for the 150,000 USD. In addition, from the rest 100,000 USD, 25,000 is the setup cost and there will be a 4.5% profit on the rest 75,000. The investment will always be greater or equal to 25,000 and multiple of 100. Complete the RECURSIVE methods below that take an array of integers (investments) and an iterator (always sets to…arrow_forward
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks ColeC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning