Question: JAVA - Be sure to use an appropriate amount of methods or points will be deducted. In general, your methods should follow a strict, one

JAVA

JAVA - Be sure to use an appropriate amount of methods or

points will be deducted. In general, your methods should follow a strict,

- Be sure to use an appropriate amount of methods or points will be deducted. In general, your methods should follow a strict, "one major task per method" rule. This helps to keep your methods organized and makes your program easier debug and understand. Example: If the task of the method is to find a sum, then it should only find that sum. Of course there may be exceptions, but you should try to follow the rule as closely as possible. - Ask the user for the dimensions of a 2D Arrays. - NOTE: Dimensions cannot be negative and you must enforce this using proper error checking with loops. - Generate an array of random integers from 0 to 99 inclusive. - Once the array has been created based on the dimensions. Display the following results: - Display the array in table format. (Print the 2D array) Calculate and display the sum and average of the entire array. Calculate and display the sum and average of each row. Calculate and display the sum and average of each column. - Display the row and col with the highest average - HINT: If you want to align the columns like mine, you will need to use System.out.printf (). Go review how to use this command. - Round results to 2 decimal places (again see System. out.printf()). - NOTE: If your program crashes or gets stuck in an infinite loop, then ONLY the parts of the program which have executed and shown output in the console will be graded. Sample Output (Formatted to look exactly as below): Enter the dimensions of the array (row col): 34 Display Array: 233442459966120898728 Table Statistics: Sum of Table: 453.0 Avg of Table: 37.75 Row 1 Sum: 88.0 Row 1 Avg: 22.0 Row 2 Sum: 140.0 Row 2 Avg: 35.0 Row 3 Sum: 225.0 Table Statistics: Sum of Table: 453.0 Avg of Table: 37.75 Row 1 Sum: 88.0 Row 1 Avg: 22.0 Row 2 Sum: 140.0 Row 2 Avg: 35.0 Row 3 Sum: 225.0 Row 3 Avg: 56.25 Col 1 Sum: 99.0 Col 1 Avg: 33.0 Col 2 Sum: 210.0 Col 2 Avg: 70.0 Col 3 Sum: 101.0 Col 3 Avg: 33.67 Col 4 Sum: 43.0 Col 4 Avg: 14.33 Highest Avg Row: Row 3 Highest Avg Col: Col 2 Lowest Avg Row: Row 1 Lowest Avg Col: Col 4

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!