Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2: Write a Java class called ArrayTwoDim.java which calculates the sum of rows and columns of a 2D array (Matrix) and displays the 2D

Problem 2:

Write a Java class called ArrayTwoDim.java which calculates the sum of rows and columns of a 2D array (Matrix) and displays the 2D array.

The 2D array is already provided in Java class ArrayTwoDimTest.java , use this class to test the ArrayTwoDim.java.

Submit only the ArrayTwoDim.java file. We will use our own ArrayTwoDimTest to test your ArrayTwoDim class when grading your submission.

Input 2D array:

20 15 6 19 18

4 46 24 17 18

12 50 23 16 31

Sample Output:

The sum of row 1 = 78

The sum of row 2 = 109

The sum of row 3 = 132

The sum of column 1 = 36

The sum of column 2 = 111

The sum of column 3 = 53

The sum of column 4 = 52

The sum of column 5 = 67

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_2

Step: 3

blur-text-image_3

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 Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

What is paper chromatography?

Answered: 1 week ago

Question

Explain the cost of capital.

Answered: 1 week ago

Question

Define capital structure.

Answered: 1 week ago