Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write C++ program that defines functions to calculate bonus and add it to the salaries entered by the user then compute the total sum

Write C++ program that defines functions to calculate bonus and add it to the salaries entered by the user Call the calcSalaries function and display the returned value i.e. cout < < Prompt the user to enter the

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 and 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 and 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%

Step by Step Solution

3.39 Rating (158 Votes )

There are 3 Steps involved in it

Step: 1

include include using namespace std Function to calculate salaries ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions