Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that calculates and prints the amount of wages due to an employee for a week's work. The program starts by asking the

image text in transcribed
image text in transcribed
image text in transcribed
Write a program that calculates and prints the amount of wages due to an employee for a week's work. The program starts by asking the number of hours worked in the week and the hourly rate. Any hours worked beyond the regular 40 hours and up to 60 hours earns 1.5 times the regular hourly rate. Any hours worked beyond 60 and up to 80 earns 2 times the regular hourly rate. After reading the hours and hourly rate, the program must also ask if any hours worked in the week was on a holiday. If so, those hours must be deducted from the regular hours and applied a rate of 2 times the regular rate. For example, if hours worked was 40, but 8 of them was on a holiday, 32 hours earns the regular rate and 8 hours at double the regular rate. If 55 hours was worked, but 5 of the hours was on a holiday, 35 hours is regular (40 - 5), 5 hours at twice the rate (for holiday hours), and remaining 15 hours at 1.5 times the regular rate. If 70 hours was put in, 10 of them on a holiday, 30 is at regular rate (40 - 10), 10 at double the rate (for holiday hours), 20 at 1.5 times and the remaining 10 again at double the rate because it was more than 40 Submit Assignment Previous 000 DOG Dashboard Calendar To Do Notifications Inbox rate. If 70 hours was put in, 10 of them on a holiday, 30 is at regular rate (40 - 10), 10 at double the rate (for holiday hours), 20 at 1.5 times and the remaining 10 again at double the rate because it was more than 60 (30+10+20+10 = 70). Finally, ask the user if the employee had a birthday in the week. If so, add a bonus of 7% of the wages due and display the total, including the bonus, in currency format, Submit only the cpp file. Example: Enter hours worked for the week: 45 Enter hourly rate: $10 How many of these were on a holiday? 5 Did the employee have a birthday in the week [y]? y ]? Wages due for the week: $561.75 Press any key to continue. TCTung me ponus, currency romma Submit only the cpp file. Example: Enter hours worked for the week: 45 Enter hourly rate: $10 How many of these were on a holiday? 5 Did the employee have a birthday in the week [y]? y Wages due for the week: $561.75 Press any key to continue. In the above example, since 5 hours was on a holiday, it leaves 35 for regular hours at $10 an hour ($350), plus 5 holiday hours at double the regular rate ($100), plus the 5 hours that were beyond the regular 40 hours which earn 1.5 times the regular rate ($75), for a total of $525. Finally, since the employee had a birthday in the week, 7% of $525 was added to the total. Submit Assignment Previous Dashboard Calendar To Do Notifications Inbox

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

Expert Performance Indexing In SQL Server

Authors: Jason Strate, Grant Fritchey

2nd Edition

1484211189, 9781484211182

More Books

Students also viewed these Databases questions

Question

=+ a. a family deciding whether to buy a new car

Answered: 1 week ago

Question

=+10. How are inflation and unemployment related in the short run?

Answered: 1 week ago