Question: Program#2(25 points): Design and implement a Java class (name it summers tats) that tracks statistics for summer job salaries for a group of employees over

 Program#2(25 points): Design and implement a Java class (name it summers

Program#2(25 points): Design and implement a Java class (name it summers tats) that tracks statistics for summer job salaries for a group of employees over several years. The only data field in the class is a two- dimensional array of values representing the salaries. The rows represent employees and the columns represent the years. The class constructor method takes two integers representing the number of employees and the number of years, creates the array, randomly generates the annual salaries (between $2,000 and $50,000), and fills the array The class defines the following methods: 1. A method named mostMoney() to return the index of the person having made the most money over the years 2. A method named highestsalaryYear to return the index of the year when the highest salary was earned. 3. A method named totalEarnings to return the total amount of money made by a specified person (i.e., specific row index passed as a parameter to the method) 4. A method named allEarnings) to return the total amount of money made by all the employees over the years. 5. A method named highestSalaryPerson to return the index of the person who made the highest salary in a given year (specific by column index passed as a parameter to the method). 6. A method named averageSalaryEachYear to return a one-dimensional array of the average salary for each year 7. A method named printSalaries to print the salaries array(employees' data) in tabular format as shown below (the sample output assume 3 employees and 4 years). Write a test program named testSummerStats to create an object of this class and test all of the class methods on that objects. The outputs should be organized as follows (assuming three employees and four years). Note the outputs below the employee data are from each of the methods above in that order Employee Data: Yearl Year2 Year3 Year4 Employee $37,320 Employee2 $17,100 Employe3 $49,300 44, 320 $30,220 $48,210 14, 630 $44,550 45, 420 $32, 650 31,750 49,800 Employee3 made most money over the years Highest salary was made in Year4 Total earning by Employeel is $128,920 Total earning by all Employees is $445,270. In year3, Employee3 has the highest salary The average salary for year: Yearl Year2 Year3 Year4 $34,573.33 $40,916.67 $34,866.67 $38,066. 67

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!