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++
- Workers at a particular company are paid at a rate of 150.00 per hour for up to 40 hours of work at hour over that is paid at a rate of 1.5 times the normal rate. From the worker’s gross pay, 14% is withheld for income tax, 5% withheld for social security system tax, and 13% is withheld for state income tax. An additional 10% is withheld if the worker has 3 or more covered dependents to cover extra cost of health insurance. Draw the flowchart and code the C program that outputs the worker’s gross pay, each withholding and the net take home pay for the week.arrow_forwardA real estate agency pays a sales representative monthly minimum income of 1000, 54 TL, additional allowance according to his/her title, plus 200 TL for each property sold by the sales representative in that month and a certain amount of the sales amount. Additional allowance amounts by title and bonus rates are given in the tables below: Title Additional Allowance (TL) Trainee (1) 250 Beginner (2) 350 Expert (3) Senior (4) 500 750 Sales Amount (TL) Bonus Rate (%) 0- 499.999,99 0.25 500.000- 999.999,99 0.5 1.000.000- 1.999.999,99 0.75 2.000.000-.. 1 By adhering the rules stated above, find the total salary amount of a sales representative for a particular month, by obtaining the title of a sales representative from the user (1 for the trainee, 2 for the novice, 3 for the specialist, 4 for the senior), the number of real estate sold this month and the total sales amount made by the sales representative. Write a C code that prints the total salary on the screen using the switch-case…arrow_forwardA real estate agency pays a sales representative monthly minimum income of 1000, 54 TL, additional allowance according to his/her title, plus 200 TL for each property sold by the sales representative in that month and a certain amount of the sales amount. Additional allowance amounts by title and bonus rates are given in the tables below: Title Additional Allowance (TL) Trainee (1) Beginner (2) 250 350 Expert (3) 500 Senior (4) 750 Sales Amount (TL) Bonus Rate (%) 0- 499.999,99 0.25 500.000- 999.999,99 0.5 1.000.000- 1.999.999,99 0.75 2.000.000-... 1 By adhering the rules stated above, find the total salary amount of a sales representative for a particular month, by obtaining the title of a sales representative from the user (1 for the trainee, 2 for the novice, 3 for the specialist, 4 for the senior), the number of real estate sold this month and the total sales amount made by the sales representative. Write a MATLAB code that prints the total salary on the screen using the…arrow_forward
- Amarillo Video Store is planning a promotional give-away for its long-standing customers. If the customer has been a member for 18 months or more he/she will receive a coupon booklet allowing him/her to hire 4 movies for free. If during that same 18 months he/she has hired at least 12 videos, he/she will receive an additional 3 free movie hire vouchers. If the customer’s membership is less than 18 months and he/she has hired at least 12 videos then he/she will receive 2 free movie hire vouchers. All members will receive a Thank You letter and “Yentia Obiaa” music video. Construct a Decision Tree for the above scenario.arrow_forwardDuring the tax season, every Friday, the J&J accounting firm provides assistance to people who prepare their own tax returns. Their charges are as follows: If a person has low income (<= 25,000) and the consulting time is less than or equal to 30 minutes, there are no charges; otherwise, the service charges are 40% of the regular hourly rate for the time over 30 minutes. For others, if the consulting time is less than or equal to 20 minutes, there are no service charges; otherwise, service charges are 70% of the regular hourly rate for the time over 20 minutes. (For example, suppose that a person has low income and spent 1 hour and 15 minutes, and the hourly rate is $70.00. Then the billing amount is 70.00 X.40 X (45/60) = $21.00.) Instructions Write a program that prompts the user to enter yearly income, the hourly rate, the total consulting time. The program should output the billing amount. Your program must contain a function that takes as input the hourly rate, the total…arrow_forwardAn oil and gas exploration firm invested $2,000,000 in drilling for natural gas in a new gas field. The firm's geologist believes the field has the potential to produce gas for many years. The revenue resulting from the gas well the first year after drilling is $600,000; based on previous experiences with similar types of wells, it is expected the annual revenue will decrease at an annual rate of 3%. Likewise, the costs of operating the well the first year totals $100,000; costs are expected to increase at an annual rate of 7%. If the firm's MARR is 17%, how long will it take for the firm to recover its investment? Hint: Using Excel's Goal Seek or SOLVER tool leave cell for the number of years required to recover the investment empty. Click here to access the TVM Factor Table calculator. n = L1 yearsarrow_forward
- An employee is paid at a rate of $16.78 per hour for the first 40 hours worked in a week. Any hours over that are paid at the overtime rate of one- and-one-half times that. From the worker’s gross pay, 6% is withheld for Social Security tax, 14% is withheld for federal income tax, 5% is withheld for state income tax, and $10 per week is withheld for union dues. If the worker has three or more dependents, then an additional $35 is withheld to cover the extra cost of health insurance beyond what the employer pays. Write a program that will read in the number of hours worked in a week and the number of dependents as input and will then output the worker’s gross pay, each withholding amount, and the net take-home pay for the week. For a harder version, write your program so that it allows the calcula- tion to be repeated as often as the user wishes. If this is a class exercise, ask your instructor whether you should do this harder version.arrow_forwardRead this:Selective Service Registration Registration with the Selective Service is mandatory in America. The law states "it is the duty of every male citizen of the United States between the ages of 18 and 25, to register." The law does not require women to register. Failure to register for selective service is a crime. If found guilty, a person could be fined up to $250,000. They might also receive a sentence of five years in prison. All men over 18 should register online at the Selective Service System website (www.sss.gov). Registration can also be done at any US Post Office. It is a duty that allows for freedom in America. Explain the purpose for registering with the Selective Service System. Is this action a duty or a responsibility?arrow_forwardA company sales manager requires a sales analysis of the two products on offer atthe end of the month. The company employs five salespeople. Input values for each salesperson are name, number, gender, and total units sold forthe month, for each product (one and two). The salary of each salesperson is strictly commission-based. Each salespersonearns a basic commission calculated as 12.5% of his/her total sales. If a salesperson sells more than R1 000 of product two, he or she receives anadditional 10% commission on product two. If not, commission for sales of producttwo is reduced to 5% (i.e. instead of receiving the basic 12.5% commission for salesof product two, a penalty is paid). If a saleswoman sells more than R500 of product one, she receives a bonus of R100. An added bonus of R750 is given to each salesperson whose total commission ismore than R6 000. Each employee receives a printed pay-slip showing all the employee details, grosspay, all the deductions and/or additions,…arrow_forward
- During the tax season, every Friday, the J & J tax accounting firm provides assistance to people who prepare their own tax returns. Their charges are as follows:a. If a person has low income (<= 25,000) and the Consulting time is less than or equal to 30 minutes, there are no charges; otherwise the service charges are 40% of the regular hourly rate for the time over 30 minutes.b. For others, if the Consulting time is less than or equal to 20 minutes, there are no service charges; otherwise, service charges are 70% of the regular hourly rate for the time over 20 minutes.(For example, suppose that a person who has low income is spent 1 hour and 15 minutes, and the hourly rate is $70.00. Then the billing amount is $70.00 x 40 x (45/60) = $21.00). Write a program that prompts the user to enter the hourly rate, the total Consulting time, and whether the person has a low income. The program should output the building of Mount your program must contain a function that takes as input…arrow_forwardRates of tax from years of assessment ending 2021/22 (N$) Taxable Income N$ 0- 50 000 50 001 - 100 000 100 001 - 300 000 Not taxable 18% for each N$ above 50 000 9 000 + 25% for each N$ above 100 000 300 001 - 500 000 59 000 + 28% for each N$ above 300 000 500 001 - 800 000 115 000 + 30% for each N$ above 500 000 800 001 - 1 500 000 205 000 + 32% for each N$ above 800 000 Above 1 500 000 429 000 + 37% for each N$ above 1 500 000 1. Using the if, elseif, ·., else control structure, write a MATLAB program for calculating individual taxes (a) Using the program above, Compute a monthly tax (in Namibian Dollars) payable by an individual earning N$980, 953 per annum, with a tax free monthly allowance of N$15, 000. NB: Your answer to this question should be presented as a comment at the end of the main code, with all details. 2) Using the switch, case, · otherwise control structure, write a MATLAB program for calculating individual taxes. a) Using the program above, compute an annual tax (in…arrow_forwardThe Livewright Medical Supplies Company has a total of 12 salespeople it wants to assign to three regionsthe South, the East, and the Midwest. A salesperson in the South earns $600 in profit per month for the company, a salesperson in the East eams $540, and a salesperson in the Midwest earns $375. The southern region can have a maximum assignment of 5 salespeople. The.company has a total of $750 per day available for expenses for all 12 salespeople. A salesperson in the South has average expenses of $80 per day, a salesperson in the East has average expenses of$70_pér day, and a salesperson in the Midwest has average daily expenses of $50. The company wants to detemine the number of salespeople to assign to each region to maximize profit. a. Formulate an integer programming model for this problem. b. Solve this model by using the computer.arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningOperations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks ColeC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr