Java Program to Sort Total Employee Hours in A Two Dimensional Array Project
Description
Suppose the weekly hours for all employees are stored in a two-dimensional array. Each row records an employee’s seven-day work hours with seven columns. For example, the following array stores the work hours for eight employees. Write a Java program that displays employees and their total hours in decreasing order of the total hours.
input data:
2 4 3 4 5 8 8
7 3 4 3 3 4 4
3 3 4 3 3 2 2
9 3 4 7 3 4 1
3 5 4 3 6 3 8
3 4 4 6 3 4 4
3 7 4 8 3 8 4
6 3 5 9 2 7 9
Output should be like this:
Employee 7 worked 41 hours
Employee 6 worked 37 hours
Employee 0 worked 34 hours
Employee 4 worked 32 hours
Employee 3 worked 31 hours
Employee 5 worked 28 hours
Employee 1 worked 28 hours
Employee 2 worked 20 hours
Thank you!
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."