Question: Java Programming (8) YouTube Home l Chegg.com Assignments-17FA-CPS-12. yProgram5.pdf eduardo C Secure https://blackboard.kean.edu/bbcswebdav/pid-668534-dt-content-rid-2480802 1/courses/17FA CPS 1231.01/Program5.pdf Assianment: Carefully read the instructions and write a program

Java ProgrammingJava Programming (8) YouTube Home l Chegg.com Assignments-17FA-CPS-12. yProgram5.pdf eduardo C Secure

(8) YouTube Home l Chegg.com Assignments-17FA-CPS-12. yProgram5.pdf eduardo C Secure https://blackboard.kean.edu/bbcswebdav/pid-668534-dt-content-rid-2480802 1/courses/17FA CPS 1231.01/Program5.pdf Assianment: Carefully read the instructions and write a program that reads the following information and prints a payroll statement Employee's name (e.g., Smith) Number of hours worked in a week (e.g., 10) Hourly pay rate (e.g., 9.75) Federal tax withholding rate (e.g., 2096) State tax withholding rate (e.g., 996) Enter employee's nane: Enter number of hours worked in a week: 48 Enter hourly pay rate Enter federal tax withholding rate: 0.15 Enter state tax withholding rate: .08 John Enter employee's name: Smith Enter number of hours worked in a week: 10 Enter hourly pay rate: 9.75 Enter federal tax withholding rate: 0.2 Enter state tax withholding rate: 0.09 : 12.5 Employee Name: Smith Hours Worked: 10.00 Pay Rate: $9.75 Gross Pay: $97.58 Deductions: Employee Nane: John Hours Worked: 40.00 Pay Rate: $12.5e Gross Pay: $580.e Deductions: Federal Withholding (20.0): $19.se State Withholding (9.0): $8.78 Total Deduction: $28.28 Federal withholding (15.00%): $75.00 State withholding (8.00%): $48.00 Total Deduction: $115.80 et Pay: $69.23 Net Pay: $385.08 In summary, design a program to Prompt user for 5 values and read the values using Scanner o Use method .next) to get the String for the name o Use method .nextDouble) to get all other numeric values Calculating the Gross pay o Gross pay = hours worked * hourly pay rate .Calculating the Federal withholding o Federal withholdingGross payfederal tax withholding rate Calculating the State withholding . State withholding = Gross pay state tax withholding rate .Calculating the Total deduction Total deduction = Federal withholding + State withholding .Calculating the Net Pay o Net Pay Gross pay Total deduction Formatting the output as shown on Sample run o Correctly format to 2 decimals and use of $ (hint $o.2f) o Indenting the under Deductions (hint \t) o Printing % for state withholding and federal withholding rate (hint refer to ch4lab4 #1 c)

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!