Question: 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),

 Write a Java program named Totals that reads an input file

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

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!