Question: Write a complete, working C++ program called euidB.cpp (where euid is your EUID) that does the following: Compute bonus based on salary and experience of

Write a complete, working C++ program called euidB.cpp (where euid is your EUID) that does the following: Compute bonus based on salary and experience of an employee. Declare two double variables one for the salary and the other for the bonus of the employee. Declare an integer variable to store the number of years of experience of the employee. Using cin and cout statements, prompt the user to enter the salary of the employee. Using cin and cout statements, prompt the user to enter the experience of the employee. Compute the bonus of the employee using the following logic. o If the number of years of experience is greater than 10, the bonus is a seeded random number generated between 2000 and 10% of the salary, inclusive. o If the number of years of experience is NOT greater than 10, the bonus is a seeded random number generated between 1000 and 4000, inclusive. Display the bonus as well as total pay of the employee using suitable messages. o Total pay is the sum of the salary and the bonus of the employee. o You must display 2 decimal numbers after the decimal point. Ask the user if another employee needs to be processed using a character variable. o The user may enter the value for the character variable in either uppercase or lowercase, but your program must work for either case. o If the user decides to process another employee, use a loop to ask the user for the salary and the experience for a new employee and compute the bonus again. o Your loop must keep on repeating until the user decides to stop processing more employees. o You must use a Boolean variable to control this loop. Due to time constraints, no comments are required in this code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!