Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Java program named Totals that reads an input file named input1. txt, where each line in the file contains an employee's ID (int),

image text in transcribed

Write a Java program named Totals that reads an input file named "input1. txt", where each line in the file contains an employee's ID (int), hours worked (int), and rate of pay (double). The input file looks like this: For each employee, the program will do the following: 1) Calculate the wages as hours times rate. 2) Calculate the withholding tax as 11 of the wages. 3) Calculate the net pay as wages minus withholding tax. 4) Print the ID, hours, wages, withholding tax, and net pay. The program will also calculate and print the total hours, total wages, and total net pay . The output of this program should look exactly like this: ID =4681 Hours =57 Wages =$1159.95WT=$127.59 Net Pay=\$1032.36 ID =5932 Hours =35 Wages =$670.25WT=$73.73 Net Pay=\$ 596.52 ID =7456 Hours =60 Wages =$1197.00WT=$131.67 Net Pay=\$1065.33 ID =2814 Hours =39 Wages =$982.80WT=$108.11 Net Pay=\$ 874.69 ID =3267 Hours =67 Wages =$566.15WT=$62.28 Net Pay=\$ 503.87 ID =9548 Hours =40 Wages =$910.00WT=$100.10 Net Pay=\$ 809.90 ID =6375 Hours =73 Wages =$1361.45WT=$149.76 Net Pay=\$1.211.69 ID =8193 Hours=43 Wages =$724.55WT=$79.70 Net Pay=\$ 644.85 Total Hours =414 Total Wages =$7572.15 Total Net Pay =$6739.21 Write the output to a file named "output. txt

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

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions

Question

Evaluate the importance of the employee handbook.

Answered: 1 week ago

Question

Discuss the steps in the progressive discipline approach.

Answered: 1 week ago