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

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_2

Step: 3

blur-text-image_3

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2022 Grenoble France September 19 23 2022 Proceedings Part 4 Lnai 13716

Authors: Massih-Reza Amini ,Stephane Canu ,Asja Fischer ,Tias Guns ,Petra Kralj Novak ,Grigorios Tsoumakas

1st Edition

3031264118, 978-3031264115

More Books

Students also viewed these Databases questions

Question

3 How the market system answers four fundamental questions.

Answered: 1 week ago

Question

5 The mechanics of the circular flow model.

Answered: 1 week ago