Question: Write a new Java code. use your own code + words. write in first year very basic beginner level. Please write in very detail. 2-Dimensional

Write a new Java code. use your own code + words. write in first year very basic beginner level. Please write in very detail.

2-Dimensional Array Operations.

Use a Java class with a main method.

In this class (after the main method), define and implement the following methods:

  • public static void printArray. This method accepts a two-dimensional double array as its argument and prints all the values of the array, separated by a comma, each row in a separate line.
  • public static double getAverage. This method accepts a two-dimensional double array as its argument and returns the average of all the values in the array.
  • public static double getRowTotal. This method accepts a two-dimensional double array as its first argument and an integer value as its second argument. The second argument is the subscript of a row in the array. The method returns the total of the values in the specified row.
  • public static double getLowestInColumn. This method accepts a two-dimensional double array as its first argument and an integer value as its second argument. The second argument is the subscript of a column in the array. The method should return the lowest value in the specified column of the array.

In the main method create and initialize a 2-dimensional array of double numbers and test all the methods described above.

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!