#java #startingoutwithjava
Solved: Write a class named 2DArrayOperations with the following static methods:
1) getTotal. This method should accept a two-dimensional array as its argument and return the total of all the values in the array. Write overloaded versions of this method that work with int, float, double, and long arrays.
2) getAverage. This method should accept a two-dimensional array as its argument and return the average of all the values in the array. Write overloaded versions of this method that work with int, float, double, and long arrays.
3) getRowTotal. This method should accept a two-dimensional array as its first argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The method should return total of the values in the specified row. Write overloaded versions of this method that work with int, float, double, and long arrays.
4) getColumnTotal. This method should accept a two-dimensional array as its first argument and an integer as its second argument. The second argument should be the subscript of a column in the array. The method should return the total of the values in the specified column. Write overloaded versions of this method that work with int, float, double, and long arrays.
5) getHighestInRow. This method should accept a two-dimensional array as its first argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The method should return the highest value in the specified row of the array. Write overloaded versions of this method that work with int, float, double, and long arrays.
6) getLowestInRow. This method should accept a two-dimensional array as its first argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The method should return the lowest value in the specified row of the array. Write overloaded versions of this method that work with int, float, double, and long arrays.
Demonstrate the class in a complete program with the test data stored in two-dimensional arrays of various data types.