Question: Write a program that computes weekly hours for each employee. Store the weekly hours for all employees in a two-dimensional array. Each row records an

Write a program that computes weekly hours for each employee. Store the weekly hours for all employees in a two-dimensional array. Each row records an employees seven-day work hours with seven columns. For example, the following array stores the work hours for eight employees. Display employees and the total hours of each employee in decreasing order of the total hours.

Write a program that computes weekly hours for each employee. Store the

Write a program that computes weekly hours for each employee. Store the weekly hours for all employees in a two-dimensional array. Each row records an emplyee's seven-day work hours with seven columns. For example, the following array stores the work hours for eight employees. Display employees and the total hours of each employee in decreasing order of the total hours. Design a method that takes the 2-D array of weekly hours of all employees as an input parameter, calculates the sum of the total hours of all employees and returns the total hour results in an array. Design a method to sort the above returned array in Requirement 1 in descending order by selection sort. Design a method to display the results of employees and their total hours in decreasing order. The sample output for the above example is as follows: Design a main method that uses the short hand initializer to initialize the 2-D array of weekly hours of all employees and invokes all the three methods in Requirements 1-3 in a sequence

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!