Matrix Add [2D Arrays Programming]

Matrix Add [2D Arrays Programming]#

Download starter code

Write a method named matrixAdd that accepts a pair of two-dimensional arrays of integers as parameters, treats the arrays as 2D matrices and adds them, returning the result. The sum of two matrices A and B is a matrix C where for every row \(i\) and column \(j\), \(C_{ij} = A_{ij} + B_{ij}\). You may assume that the arrays passed as parameters have the same dimensions and both arrays are non-null and rectangular (meaning that every row has the same number of elements).