Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

STAGE 1: Calculate Gross Pay | GrossPay.java Write a program to compute gross pay. The inputs to your program are employee name, the hours worked

STAGE 1: Calculate Gross Pay | GrossPay.java

Write a program to compute gross pay. The inputs to your program are employee name, the hours worked per week, and the hourly pay rate. The rule for determining gross pay is to pay the regular pay rate for all hours worked up to 40, time-and-half for all hours over 40 up to 54, and double time for all hours over 54. Compute and display the value for gross pay using this rule. Your program should output hours worked, pay rate, and gross pay. Format you output to display two decimal places. Here are the sample runs of this program:

Enter Employee name: John Smith

Enter hours worked: 25

Enter pay rate: 10

John Smith worked for 25 hours with pay rate of $10.00. The gross pay for John Smith is $250.00

Enter Employee name: John Smith

Enter hours worked: 50

Enter pay rate: 10

John Smith worked for 50 hours with pay rate of $10.00. The gross pay for John Smith is $550.00

Enter Employee name: John Smith

Enter hours worked: 65

Enter pay rate: 10

John Smith worked for 65 hours with pay rate of $10.00. The gross pay for John Smith is $830.00

STAGE 2: Submission

Copy and Paste sample runs of stage 1 in a file called Lab03_output

I should have a file GrossPay.java, Lab03_output

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

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

How does your message use verbal communication?

Answered: 1 week ago