Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An employee wants to provide bonus to its employees. Here are the requirements and conditions Bonus is 10% of annual salary if performance is Good.

image text in transcribed
An employee wants to provide bonus to its employees. Here are the requirements and conditions Bonus is 10% of annual salary if performance is Good. Bonus is 5% of annual salary if performance is Average. No bonus if performance is Poor. You'll need to write a programmer defined function to calculate the bonus. The function will accept a double data-type for salary and an enum data-type for performance, and will return the calculated bonus to the main function. Prompt the use for salary and performance in the main function, and pass their values to your programmer defined function. You may have to provide your enum declaration global scope for your code to work. You' ll have to add the bonus to the annual salary of the employee, and display the bonus and the total pay in the main function. If the user enters a wrong choice for enum, return -1, and display a suitable error message in your main function. An employee wants to provide bonus to its employees. Here are the requirements and conditions Bonus is 10% of annual salary if performance is Good. Bonus is 5% of annual salary if performance is Average. No bonus if performance is Poor. You'll need to write a programmer defined function to calculate the bonus. The function will accept a double data-type for salary and an enum data-type for performance, and will return the calculated bonus to the main function. Prompt the use for salary and performance in the main function, and pass their values to your programmer defined function. You may have to provide your enum declaration global scope for your code to work. You' ll have to add the bonus to the annual salary of the employee, and display the bonus and the total pay in the main function. If the user enters a wrong choice for enum, return -1, and display a suitable error message in your main function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions