Write C++ program that defines functions to calculate bonus and add it to the salaries entered...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write C++ program that defines functions to calculate bonus and add it to the salaries entered by the user then compute the total sum of the all the salaries. Also, your program will determine the insurance coverage percent as per the company's rules. The output of this assignment should include your name, ID, and date. Follow the instructions below to complete the assignment: 1. Define calcSalaries function: Has no parameters • The function will prompt the user to enter the employee salaries and stops when the user enters -1 (use while loop). • Each time the user enters the salary, a bonus will be displayed on the screen. The bonus should be added to salary (apply rules found in the table below). . The functions should return the sum of the calculated salaries (bonus included). Current Salary <= 1500 >1500 and <= 2000 >2000 2. Define insurePercent function: Takes one int parameter - years • The function should evaluate and return the insurance coverage percentage based on the number of years the employee worked in the company, as per the following rules: Number of years <= 2 >2 and <=5 >5 Bonus percent 0.1 0.5 0.0 3. In the main function: Insurance coverage 20% 50% 100% • Display the company's name and year as in the output provided. • Display your name, ID, and the date. ● ● Call the calcSalaries function and display the returned value i.e. cout<< Prompt the user to enter the number of years worked in the company Call the insurePercent and display the returned value i.e. cout<< You should have the following output: C:\Users\96597\Documents\Desktop\C++ Projects\Assign4\Debug\Assign4.exe ABC Company USA - 2021 YOUR NAME ID DATE Enter the employee salary (or press -1 to quit): 1200 10% bonus added. Enter the employee salary (or press -1 to quit): 1600 50% bonus added. Enter the employee salary (or press -1 to quit): -1 The total sum of all salaries: 3720.00 $ Insurance Coverage Enter the Number of years: 2 The Insurance Coverage is: 20% Write C++ program that defines functions to calculate bonus and add it to the salaries entered by the user then compute the total sum of the all the salaries. Also, your program will determine the insurance coverage percent as per the company's rules. The output of this assignment should include your name, ID, and date. Follow the instructions below to complete the assignment: 1. Define calcSalaries function: Has no parameters • The function will prompt the user to enter the employee salaries and stops when the user enters -1 (use while loop). • Each time the user enters the salary, a bonus will be displayed on the screen. The bonus should be added to salary (apply rules found in the table below). . The functions should return the sum of the calculated salaries (bonus included). Current Salary <= 1500 >1500 and <= 2000 >2000 2. Define insurePercent function: Takes one int parameter - years • The function should evaluate and return the insurance coverage percentage based on the number of years the employee worked in the company, as per the following rules: Number of years <= 2 >2 and <=5 >5 Bonus percent 0.1 0.5 0.0 3. In the main function: Insurance coverage 20% 50% 100% • Display the company's name and year as in the output provided. • Display your name, ID, and the date. ● ● Call the calcSalaries function and display the returned value i.e. cout<< Prompt the user to enter the number of years worked in the company Call the insurePercent and display the returned value i.e. cout<< You should have the following output: C:\Users\96597\Documents\Desktop\C++ Projects\Assign4\Debug\Assign4.exe ABC Company USA - 2021 YOUR NAME ID DATE Enter the employee salary (or press -1 to quit): 1200 10% bonus added. Enter the employee salary (or press -1 to quit): 1600 50% bonus added. Enter the employee salary (or press -1 to quit): -1 The total sum of all salaries: 3720.00 $ Insurance Coverage Enter the Number of years: 2 The Insurance Coverage is: 20%
Expert Answer:
Answer rating: 100% (QA)
include include using namespace std Function to calculate salaries ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
2. Watch YouTube video by Matthieu Ricard, "How to Let Altruism be Your Guide" and respond to the questions below. How does Matthieu Ricard define altruism? Why does Ricard believe that altruism is...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
What are four advantages of integrating AI technologies into decision support systems?
-
The magnetic field perpendicular to a single 13.2-cmdiameter circular loop of copper wire decreases uniformly from 0.670 T to zero. If the wire is 2.25 mm in diameter, how much charge moves past a...
-
Finola has a circuit with a 4.00-k resistor, a 0.750-H inductor, and a capacitor of unknown value connected in series to a 440.0-Hz ac source. With an oscilloscope, she measures the phase angle to be...
-
Bond Back Clinic, Inc., started a business when Dr. Bond purchased \($8,000\) of stock in the business. Before starting operations, Bond Back Clinic, Inc., borrowed \($5,000\) cash by signing a note...
-
What is interim financial information, and why is interim financial information required to be reviewed? What professional standards provide guidance on the conduct of reviews of interim financial...
-
What distributions has Tesla made during most recent three years? How do those distributions compare to competitors (Volkswagen, General Motors,Ford, Lucid Motors ? Should the amounts be increased or...
-
Pistol Corporation acquired 70 percent of Scope Corporations voting stock on May 18, 20X1. The companies reported the following data with respect to intercompany sales in 20X4 and 20X5: Pistol...
-
Addison, Inc. makes a single product, an indoor fireplace. Data for last year is as follows: Selling price per fireplace Manufacturing costs: Variable per unit produced: Direct materials Direct labor...
-
Do you think the state has any intention of ever stopping the lottery, given the fact that the state relies on it to bring millions of dollars into its treasury? b. Is it possible that lottery can...
-
Covid and post Covid Economic Recovery for each of the papers you are required to state the following : 1. what was the study about 2. what were the findings 3. list the research gaps and suggest new...
-
Look at the effects on accrual income and cash basis income in the period revenue is accrued and in the next period when you collect cash. Also, look at the effects on accrual income and cash basis...
-
Mrs. Sam Taffer was a brilliant engineer at IBM and made a lot of money from stock options. Since then, she has worked as a musician and raised her two sons. She wishes to have most of her property...
-
The Happy Wimp Co. is in the business of processing corn into oil, sugar, meal, and chaff. Each month the Happy Wimp Co. processes 20,000 pounds. The yields, additional processing costs, and selling...
-
Breakdown the Integration and Apply Initial conditions to solve this problem: dy +6y= ex, y(0) = 1 dx
-
The Adjusted Trial Balance columns of a 10-column work sheet for Webber Co. follow. Complete the work sheet by extending the account balances into the appropriate financial statement columns and by...
-
Dr. Ivan I. Incisor and his wife Irene are married and file a joint return for 2012. Ivan's Social Security number is 477-34-4321 and he is 48 years old. Irene I. Incisor's Social Security number is...
-
Carl and Jenny adopt a Russian orphan. The adoption takes 2 years and two trips to Russia and is final in 2012. They pay $6,000 in 2011 and $7,500 in 2012 of qualified adoption expenses, and have AGI...
-
Amy is a calendar-year taxpayer reporting on the cash basis. Please indicate how she should treat the following items for 2012: a. She makes a deductible contribution to an IRA on April 15,...
-
Derive Maxwell's relations.
-
A spherical balloon of \(1 \mathrm{~m}\) diameter contains a gas at \(120 \mathrm{kPa}\). The gas inside the balloon is heated until the pressure reaches \(360 \mathrm{kPa}\). During heating the...
-
(a) State and prove Clausius inequality theorem. (b) Nitrogen is compressed from an initial state of 1 bar and \(25^{\circ} \mathrm{C}\) to a final state of \(5 \mathrm{bar}\) and \(25^{\circ}...
Study smarter with the SolutionInn App