Question: Write a Java program/class which creates a 10x10 two-dimensional array containing elements which consist of random integers with values from 0 to 100 . Print

Write a Java program/class which creates a 10x10 two-dimensional array containing elements which consist of random integers with values from 0 to 100.

Print the contents of the array, nicely formatted, in a 10x10 matrix.

Search the matrix to determine the largest and smallest values in the matrix, and print the values along with the row and column, where they were found.

Also, create a method that will receive the array as a parameter and calculate and return the mean(average) of the values in the table. Print the mean as part of your output. (All output should be printed in the main() method.)

1. The 10x10 has to be nicely formatted

2. When the matrix is searched for the min and max it has to show the location (row/col)

3. Create a method to calculate and return the mean the print line needs to be placed back in the main

4. We can only have 2 methods (public static void main(String[] args) and static double mean

PS: when choosing variables please use descriptive words(min, max, array, etc.) and list all variables at the top of the method.

Also, please comment on the code so that I can follow what it is doing in the steps. Thanks!

(I use netbeans to code if that makes a difference to you and I am not very advanced in coding so if you could use easier to understand codes it would be appreciated)

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!