Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Provide screenshot of the classes running. I can provide additional java files if needed upon request. Utility class - TwoDimRaggedArrayUtility The class TwoDimRaggedArrayUtility will

Please Provide screenshot of the classes running. I can provide additional java files if needed upon request.

Utility class - TwoDimRaggedArrayUtility

The class TwoDimRaggedArrayUtility will follow the provided Javadoc and will contain the following methods:

  1. Method readFile pass in a file and return a two-dimensional ragged array of doubles
  2. Method writeToFile pass in a two-dimensional ragged array of doubles and a file, and writes the ragged array into the file. Each row is on a separate line and each double is separated by a space.
  3. Method getTotal pass in a two-dimensional ragged array of doubles and returns the total of the elements in the array.
  4. Method getAverage pass in a two-dimensional ragged array of doubles and returns the average of the elements in the array (total/num of elements).
  5. Method getRowTotal pass in a two-dimensional ragged array of doubles and a row index and returns the total of that row. Row index 0 is the first row in the array.
  6. Method getColumnTotal - pass in a two-dimensional ragged array of doubles and a column index and returns the total of that column. Column index 0 is the first column in the array. If a row doesnt contain that column, it is not an error, that row will not participate in this method.
  7. Method getHighestInRow - pass in a two-dimensional ragged array of doubles and a row index and returns the largest element in that row. Row index 0 is the first row in the array.
  8. Method getHighestInRowIndex - pass in a two-dimensional ragged array of doubles and a row index and returns the index of the largest element in that row. Row index 0 is the first row in the array.
  9. Method getLowestInRow - a two-dimensional ragged array of doubles and a row index and returns the smallest element in that row. Row index 0 is the first row in the array.
  10. Method getLowestInRowIndex - a two-dimensional ragged array of doubles and a row index and returns the index of the smallest element in that row. Row index 0 is the first row in the array.
  11. Method getHighestInColumn - pass in a two-dimensional ragged array of doubles and a column index and returns the largest element in that column. Column index 0 is the first column in the array. If a row doesnt contain that column, it is not an error, that row will not participate in this method.
  12. Method getHighestInColumnIndex - pass in a two-dimensional ragged array of doubles and a column index and returns the index of the largest element in that column. Column index 0 is the first column in the array. If a row doesnt contain that column, it is not an error, that row will not participate in this method.
  13. Method getLowestInColumn - pass in a two-dimensional ragged array of doubles and a column index and returns the smallest element in that column. Column index 0 is the first column in the array. If a row doesnt contain that column, it is not an error, that row will not participate in this method.
  14. Method getLowestInColumnIndex - pass in a two-dimensional ragged array of doubles and a column index and returns the index of the smallest element in that column. Column index 0 is the first column in the array. If a row doesnt contain that column, it is not an error, that row will not participate in this method.
  15. Method getHighestInArray - pass in a two-dimensional ragged array of doubles and returns the largest element in the array.
  16. Method getLowestInArray - pass in a two-dimensional ragged array of doubles and returns the smallest element in the array.

Utility class HolidayBonus

The class HolidayBonus will follow the provided Javadoc and will contain the following methods:

  1. Method calculateHolidayBonus pass in a two-dimensional ragged array of doubles, and the bonus amount for the store with the highest sales in a category, the bonus amount for the store with the lowest sales in a category and bonus amount for all other stores. It will return an array of doubles which represents the holiday bonuses for each of the stores in the district. The first entry in the returned array [0] will represent the holiday bonus for the store at [0] in the two-dimensional ragged array of doubles. You will be using methods from the TwoDimRaggedArrayUtility when needed.
  2. Method calculateTotalHolidayBonus pass in a two-dimensional ragged array of doubles, and the bonus amount for the store with the highest sales in a category, the bonus amount for the store with the lowest sales in a category and bonus amount for all other stores. It will return a double which represents the total of all Holiday Bonuses for the District. You will be using methods from the TwoDimRaggedArrayUtility when needed.

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

Beyond Audit Auditing Remotely And Delivering Value

Authors: Robert L. Mainardi

1st Edition

1119789605, 978-1119789604

More Books

Students also viewed these Accounting questions