Question: write a program with a method that adds two matricies. The header of the method should be this: public static double[][] addmatrix(double[][] a, double[][] b)

write a program with a method that adds two matricies. The header of the method should be this: public static double[][] addmatrix(double[][] a, double[][] b) . both matricies must have the same dimensions and same types.

program should create 2-two dimensional arrays that are the same size and store double type numbers.

The main method will pass these 2 arrays down to the method addMatrix.

addMatrix will take the two arrays and create a third two dimensional array that adds the values from the two passed in arrays.

The addMatrix method then returns the new array to the main method.

Create a method to print out a two-dimensional array. The main method will then call the print method three times to print out all three arrays.

This program MUST work with any size array, ex. 4X4 or 6X6 or 12X12, etc.

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!