Assignment Two Implement a flexible two-dimensional array (or matrix) of doubles. A. The following methods must be supported // Constructors matrix A(3, 3); matrix B(100, 20); // Creates two matrices. A has 3 rows and 3 columns, // B has 100 rows and 20 columns. // Access methods double get(int, int) // returns the indicated entry in the matrix, making // sure that the indexes are valid. e.g. // cout << A.get(2, 2) * B.get(20, 1); void set(int, int, double) // sets the indicated entry to a new value, making // sure that the indexes are valid. e.g. // B.set(4, 1, 9.1241) sort of like B[4][1]=9.1241; // Resizer void resize(int, int) // changes the number of rows and columns, keeping the // old contents where possible. e.g. A.resize(4, 3); // A now has 4 rows and 3 columns, the first 3 rows // do not lose their contents // Copier matrix clone() // e.g. C = A.clone(); // C is now an exact copy of A. B. Also implement matrix addition, subtraction, multiplication, and transposition. These may be ordinary functions rather than methods. Also implement a destructor for your matrices. matrix add(matrix, matrix) matrix subtract(matrix, matrix) matrix multiply(matrix, matrix) void transpose(matrix &) Examples, in case you don't know matrix operations: / 1, 4, 2 \ / 2, 1, 5 \ / 3, 5, 7 \ | 2, 1, 7 | + | 6, -2, 1 | = | 8, -1, 8 | \ 5, 1, 3 / \ 1, 3, 8 / \ 6, 4, 11 / for add and subtract, sizes must be exactly the same / 1, 2, 3, 4 \ / 3, 6 \ / 1*3+2*1+3*4+4*1, 1*6+2*2+3*1+4*0 \ | 5, 6, 7, 8 | * | 1, 2 | = | 5*3+6*1+7*4+8*1, 5*6+6*2+7*1+1*0 | \ 0, 1, 0, 1 / | 4, 1 | \ 0*3+1*1+0*4+1*1, 0*6+1*2+0*1+1*0 / \ 1, 0 / / 21, 13 \ = | 57, 49 | \ 2, 2 / in A*B, number of columns in A must = number of rows in B number of rows in result = number of rows in A number of columns in result = number of columns in B / 1, 2, 3, 4 \ / 1, 5, 0 \ | 5, 6, 7, 8 | Transposed = | 2, 6, 1 | \ 0, 1, 0, 1 / | 3, 7, 0 | \ 4, 8, 1 / C. EXTRA CREDIT Also implement matrix inversion.