Write a method  that sums  all the numbers in the major diagonal in an n x n matrix of double values  using the following header:public static double  sumMajorDiagonal(double [][] m)Write a test program  that first prompts the user to enter the dimension n of an n x n matrix, then asks them to enter the matrix row by row (with the elements  separated by spaces). The program  should then print out the sum  of the major diagonal of the matrix.

Looking for this or a Similar Assignment? Click below to Place your Order

Open chat