Question: Write a program that generates an nxm two dimensional array filled with random values. The dimensions should be on [0,10] and the values should be

Write a program that generates an nxm two dimensional array filled with random values. The

dimensions should be on [0,10] and the values should be on [0,9]. You will then print out the array

with the sum of the rows and the sum of the columns.

You will generate the dimensions of the two-dimensional array in the main. Random number

generation, two-dimensional array generation, and printing of two-dimensional array with sums should

all be in methods. This program will take no user input.

For instance for a 3x4 array, the output might look like:

3 6 5 2 : 16

1 4 2 6 : 13

9 3 5 0 : 17

-------------

13 13 12 8

HINT: Summing the rows is pretty straightfoward. Summing the columns can be done in a few different

ways. One involves looping through the two-dimensional array again and the other involves creating

another array that sums the columns as you sum the rows.

***CODE IN JAVA PLEASE***

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!