Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

- 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

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

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions