Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

Describe Balor method and give the chemical reaction.

Answered: 1 week ago

Question

How to prepare washing soda from common salt?

Answered: 1 week ago

Question

Explain strong and weak atoms with examples.

Answered: 1 week ago

Question

Explain the alkaline nature of aqueous solution of making soda.

Answered: 1 week ago