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 employees id (int), hours

Write a java program named totals that reads an input file named "input1.txt", where each line in the file contains an employees id (int), hours worked (int), and rate of pay (double).
the input file looks like this:
image text in transcribed
image text in transcribed
46815932745628143267954863758193573560396740734320.3519.1519.9525.208.4522.7518.6516.85 1) Calculate the wages as hours times rate. 2) Calculate the withholding tax as 11 of 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 Wagesm =$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= =$56.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=\$1211.69 ID =8193 Hours =43 Wages =$724.55WT=$79.70 Net Pay=\$ 644.85 Total Hours =414 Total Wages =$7572.15

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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions

Question

Will globalization unite or divide us?

Answered: 1 week ago

Question

I am paid fairly for the work I do.

Answered: 1 week ago

Question

I receive the training I need to do my job well.

Answered: 1 week ago