Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

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

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions