Question: Design and implement a Java class (name it SummerStats. java) that tracks statistics for summer job salaries for a group of people over several years.

 Design and implement a Java class (name it SummerStats. java) that

Design and implement a Java class (name it SummerStats. java) that tracks statistics for summer job salaries for a group of people over several years. The only data field you need is a 2-Dimenssional array of values representing salaries. The rows the represents the people and the columns represent the years. The constructor method takes two integers representing the number of people and the number of years, then randomly generates the annual salaries and fills the array. Other class methods include the following: A method to return the index of the person having made the most money over the years. A method to return the index of the year when the highest salary was earned. A method to return the total amount of money made by a person (specified row index). A method to return the total amount of money made by all the people over the years. A method to return the index of the person who made the highest salary in a given year (specified by column index). A method to return a 1 -Dimensional array of the average salary for each year. A method that return another 2-Dimensional array sorted by the total earning per person over the years. For example, if person in index 4 has the most earning over the years, then that would be the first row in the returned array. In other word, the array is sorted by the total of each row. Write a test program to create an object of this class and test all of the class methods on that objects. Use proper labels in your output. Document your code, and organize and space the outputs properly. Use escape characters and formatting objects when applicable

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!