Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions