Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an application (Payroll Console.java) that reads the following information and prints a payroll statement: Employee's name (e.g., John Doe) Number of hours worked

 

Write an application (Payroll Console.java) that reads the following information and prints a payroll statement: Employee's name (e.g., John Doe) Number of hours worked in a week (e.g., 10.50) Hourly pay rate (e.g., 7.25) Federal tax withholding rate (e.g., 20%) State tax withholding rate (e.g., 9%) Note that this application will use console input and output. A sample run of the console input and output is shown below: Enter employee's name: John De Enter number of hours worked in a week: Enter hourly pay rate: 25 Enter federal tax withholding rate: 20 Enter state tax withholding rate: Employee Name John Dee Hours Worked: 10.50 Pay Rate: $7.25 Gross Pay: $76.13 Deductions Federal Withholding (20.00% $15.23 State Withholding (9.00%) 36.85 Total Deduction: $22.08 Not Pay: $54.05 Notes: 1. All numbers are double type numbers and in the output, each number keeps only two digits on the right of the decimal point. 2.20.00% and 9.00% in the output should be dynamic, not static, which means when the end user input 0.25 for the "federal tax withholding rate," the output should show 25.00% instead of 20.00%. Your calculation results might be a little bit different (typically the last digit) from the above results even when identical numbers are entered. This is because floating-point numbers are not stored precisely. Submit the source code file PayrollConsole.java to the drop box HA4.0.

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

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

More Books

Students also viewed these Programming questions