In a text file, I have two numbers each line. The numbers are the employee ID and the number of hours the employee work. My goal of this program is to read the both employee ID and the number of hours the employee work and print it out in the main program. If the list of employee id is not in order, sort it in order and still print it out in the main program. Additionally, after printing them out, print out the total number of employees and the total number of hours all the employee work. Write this in java For example File.txt EmployeeID Number of Hours Work 3 12 2 20 1 40 5 20 7 9
In a text file, I have two numbers each line. The numbers are the employee ID and the number of hours the employee work. My goal of this
For example
File.txt
EmployeeID Number of Hours Work
3 12
2 20
1 40
5 20
7 9
In the main program print:
EmployeeID Number of Hours Work
1 40
2 20
3 12
5 20
7 9
Step by step
Solved in 3 steps with 2 images