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++ -TEXT
- An 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- For all the employees supervised by KING, give them a salary increase, which is equal to the 2% of the company’s average salaryarrow_forwardDuring 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_forward
- Q7:The electricity accounts of residents in a very small town are calculated as follows: if 500 units or less are used the cost is 2 cents per unit; > if more than 500, but not more than 1000 units are used, the cost is $10 for the first 500 units, and then 5 cents for every unit in excess of 500; > if more than 1000 units are used, the cost is $35 for the first 1000 units plus 10 cents for every unit in excess of 1000; in addition, a basic service fee of $5 is charged, no matter how much electricity is used. Q8:Write a program which enters the following five consumptions into a vector, and uses a for loop to calculate and display the total charge for each one: 200, 500, 700, 1000, 1500. (Answers: $9 $15, $25, $40, $90)arrow_forwardA retail store has a preferred customer plan where customers can earn discounts on all their purchases. The amount of a customer’s discount is determined by the amount of the customer’s cumulative purchases in the store as follows: • When a preferred customer spends $500, he or she gets a 5 percent discount on all future purchases. • When a preferred customer spends $1,000, he or she gets a 6 percent discount on all future purchases. • When a preferred customer spends $1,500, he or she gets a 7 percent discount on all future purchases. • When a preferred customer spends $2,000 or more, he or she gets a 10 percent discount on all future purchases. Design a class named PreferredCustomer, which is derived from the Customer class you created in Programming Problem 4. The PreferredCustomer class should have properties for the amount of the customer’s purchases and the customer’s discount level. Demonstrate the class in a simple application.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
- Kevin bought a new moulding machine for $3,000. The machine deteriorates with age and requires to trade in for a new one every fifth year of usage. The resale value and the running cost are given in below table. Age of machine (year) 1 3 4 5 Maintenance cost ($) 600 700 800 900 1,000 Resale value ($) 2,000 1,333 1,000 750 500arrow_forwardBU School of Witchcraft and Wizardry is a school of magic that sends admission letters only to children with magical abilities. The admissions process for BU School of Witchcraft and Wizardry is as follows:- If both parents of the child have previously studied at BU, they do not need to reply to the admission letter. Otherwise they need to reply to the admissions letter by July 31. If they do not reply by the specified date, they are not accepted to the school. BU has 4 houses that students are sorted into by the sorting hat “Hayri”. These houses are; Gryffindor, Hufflepuff, Ravenclaw and Slytherin. Hayri sorts the students into houses according to 2 characteristics; braveness and intelligence.- If Hayri finds the student to be brave and intelligent, they are sorted into Gryffindor.- If the student is found to only be brave, they are sorted into Slytherin.- If the student is found to only be intelligent, they are sorted into Ravenclaw.- Finally, if they are neither brave nor…arrow_forwardLoyalty points are awarded by a company based on the amount a customer spend. Loyalty points can be used immediately with the current transaction or can be accumulated. The number of loyalty points per transaction is calculated as follows: For purchases of R 500.00 or less, 1 loyalty point will be awarded per R 50.00 spent. For purchases of more than R 500.00 the following applies: For the first R 500.00, 1 loyalty point will be awarded per R 50.00 spent For the remainder of the amount, 2 loyalty points will be awarded per R50.00 spent. Examples: For purchases of R 460.00, 9 loyalty points will be awarded. For purchases of R 660.00, 10 loyalty points will be awarded for the first R 500.00 and 6 loyalty points for the remaining R 160.00 = 16 loyalty points For purchases of R 1250.00, 10 loyalty points will be awarded for the first R 500.00 and 30 loyalty points for the remaining R 750.00 = 40 loyalty points The monetary value of the loyalty points is calculated as follows: The first…arrow_forward
- Loyalty points are awarded by a company based on the amount a customer spend. Loyalty points can be used immediately with the current transaction or can be accumulated. The number of loyalty points per transaction is calculated as follows:For purchases of R 500.00 or less, 1 loyalty point will be awarded per R 50.00 spent. For purchases of more than R 500.00 the following applies: For the first R 500.00, 1 loyalty point will be awarded per R 50.00 spent For the remainder of the amount, 2 loyalty points will be awarded per R50.00 spent. Examples:For purchases of R 460.00, 9 loyalty points will be awarded.For purchases of R 660.00, 10 loyalty points will be awarded for the first R500.00 and 6 loyalty points for theremaining R160.00 = 16 loyalty pointsFor purchases of R 1250.00, 10 loyalty points will be awarded for the first R 500.00 and 30 loyalty points for theremaining R 750.00 = 40 loyalty points The monetary value of the loyalty points is calculated as follows: The first 30…arrow_forwardLoyalty points are awarded by a company based on the amount a customer spend. Loyalty points can be used immediately with the current transaction or can be accumulated. The number of loyalty points per transaction is calculated as follows:For purchases of R 500.00 or less, 1 loyalty point will be awarded per R50.00 spent. For purchases of more than R 500.00 the following applies: For the first R 500.00, 1 loyalty point will be awarded per R 50.00 spent For the remainder of the amount, 2 loyalty points will be awarded per R50.00 spent. Do the following:Write a C++ code to simulate a number of transactions done by one customer.The user must enter purchase amounts for a number of transactions. Use the value of -1 as purchase amount to quit input. For each transaction display the number of loyalty points earned with the current transaction, the total number of loyalty points and the monetary value of the total number of loyalty points. If the total number of points did not reach the…arrow_forwardLoyalty points are awarded by a company based on the amount a customer spend. Loyalty points can be used immediately with the current transaction or can be accumulated. The number of loyalty points per transaction is calculated as follows:For purchases of R 500.00 or less, 1 loyalty point will be awarded per R50.00 spent.For purchases of more than R 500.00 the following applies: For the first R 500.00, 1 loyalty point will be awarded per R 50.00 spent For the remainder of the amount, 2 loyalty points will be awarded per R50.00 spent. Do the following:Write a C++ code to simulate a number of transactions done by one customer.The user must enter purchase amounts for a number of transactions. Use the value of -1 as purchase amount to quit input. For each transaction display the number of loyalty points earned with the current transaction, the total number of loyalty points and the monetary value of the total number of loyalty points. If the total number of points did not reach the…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 LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage