Question: Please help, I need help with the sumDiagonal (expected outcome is on the right) and the spiralPrint(even though it says bonus, I still need it)

Please help, I need help with the sumDiagonal (expected outcome is onPlease help, I need help with the sumDiagonal (expected outcome is on the right) and the spiralPrint(even though it says bonus, I still need it) my class is working with java, and please explain if you can

repl.it MatrixMethods learn/teach notifications aldo1 (0) 88 talk my repls student share your program enonce your work after submitting O export to rep Due: Mar 08, 2019 11:59 pm 1back to classroom nstructions from your teacher spiralPrint is bonus) After you write each method, check your results here u(square) is 33 sum(rect) 1s 20 sumRow( square, 2) is 6 sumRow rect,2) is sumCol(square, 2) is 7 susCol(rect,2) is 3 sumcross(square,1,3) is 11 sumCross (rect,1,2) is 7 issquare(square) is true 82-7 83 returns the sum of the values along both diagonals if mat is a square matrix (you must cali nethod isSquare) Do not add the center element twice if nat has an odd number of rows 86(HINT: add each diagonal using a sun variable then subtract the center 87 if nat,length % 2 == 1) return -1 if mat is not a square matrix 90 public static int sunDiagonals(int mat[]) YOUR CODE GOES HERE for (int row; rowmat.ength; row tor(int col ; col

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!