Question: a. Program 3 (10 points) Write a Java program that will calculate an employee's weekly pay amount. The program is to do the following: 1.

 a. Program 3 (10 points) Write a Java program that will

a. Program 3 (10 points) Write a Java program that will calculate an employee's weekly pay amount. The program is to do the following: 1. Prompt the user to enter the number of hours the employee worked for the week; 2. Prompt the user to enter the per-hour pay the employee is to receive; 3. Generate the amount to be paid to the employee; Note: for the purposes of this program, a regular work week is considered to be 40 or fewer hours. Should the employee work more than 40 hours, the pay for time above 40 hours is to be calculated as overtime, meaning 1 and 2 times the regular per-hour pay rate (for each overtime hour); 4. Display the following information: The number of hours worked; The per-hour pay rate for the employee; The amount to be paid to the employee. 5. NOTE: when displaying dollar amounts, the program is to be formatted so that only two decimal values appear to the right of the decimal point. 6. NOTE: constant variables are to be used to represent the 40-hour work week and the overtime multiplier of 1.5. a. b. c. When turning in your program, your program should include in addition to the sample data given below three examples of test data of your own choosing, one of which would reflect overtime payment, another reflecting regular payment. Your sample data should also include the following examples: Sample 1: hours worked: 40, per-hour pay rate: $10.00 Pay amount: $ 400.00 Sample 2: hours worked: 50, per-hour pay rate: $10.00 Pay amount: $ 550.00

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!