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?
-
What was the impact of the European Union's Eighth Directive on the regulation of auditing in the United Kingdom?
-
Near the end of 2015, the management of Isle Corp., a merchandising company, prepared the following estimated balance sheet for December 31, 2015. To prepare a master budget for January, February,...
-
What are your sales objectives? What extra information about Mr Forbes would be useful to have?
-
The following partially completed process cost summary describes the July production activities of Ashad Company. Its production output is sent to its warehouse for shipping. All direct materials are...
-
Brendon is a Carpenter by profession and has a successful business. Brendon was approached by Chris to build a double-story house. All the house plans were approved by the local Town Council and...
-
Zim Company uses the following cost function: Y = $4200 + $5.25X. If the number of units produced in a month is 100, what would be the total cost?
-
Vaughn begins Chapter Ten by calling our attention to the long debate over the fate of Terry Schaivo. As Vaughn explains, "For fifteen years, Terry Schaivo existed between life and death in that...
-
When a company is looking for a new CEO to replace the current CEO who is planning to retire in one or two years, should the company choose an internal candidate or an external candidate? Discuss.
-
The potential implications of addressing the two SDGs on strategic priorities of your target organisation. For instance, does this organisation really want to embed sustainability as a strategic...
-
Given the following information: Accounts Payable $8,100, Cash $5,800, Owner's Capital $15,000, Owner's Drawings $1,200, Equipment $17,000, Service Revenue $10,000, Accounts Receivable $3,000,...
-
Company A has current sales of $ 1 1 , 6 2 4 , 3 0 3 and a 4 1 % contribution margin. Its fixed costs are $ 2 , 8 3 9 , 5 5 3 . Company B is a service firm with a current service revenue of $ 5 , 3 9...
-
You have $45,589.25 in a brokerage account, and you plan to deposit an additional $5,000 at the end of every future year until your account totals $280,000. You expect to earn 10% annually on the...
-
Calculate shortest peath & rost using travelling. 3 5 problem 11 4 2 2 3 4 5 1 0 30 15 0 16 3 19 2 20 16 LO 5 30 4 O 18 7 4 10 y 0 3 16 0 RO
-
Define a traverse in Surveying?
-
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,...
-
True or False. The Euler-Bernoulli beam theory is more accurate than the Timoshenko theory.
-
Fixed end spring force a. Bending moment \(=0\); shear force equals the b. Deflection \(=0\); slope \(=0\) c. Deflection \(=0\); bending moment \(=0\) d. Bending moment \(=0\); shear force \(=0\)
-
Fill in the Blank. The Timoshenko beam theory can be considered as __________ beam theory.
Study smarter with the SolutionInn App