Question: Write the code in C++ ASK 2i reate a class named Matrix which has data members (rows, cols) and following functions: 1. Getters Functions to

Write the code in C++
ASK 2i reate a class named Matrix which has data members (rows, cols) and following functions: 1. Getters Functions to get the values of data members. Make separate getter functions for each data member 2. Setters Functions to set the values of data members. Make separate getter functions for each data member 3. AllocateMemory This function takes rows and columns as parameter, create a 2D matrix and return it 4. Input This function takes filename and empty matrix as parameter, read data from file, save in empty 2 matrix (array) and return the matrix 5. rotateOuterLayerBy1 This function takes a 2 dimensioual square matrix, rows and cols as parameters and rotate the outermost layer by one place, anti-clockwise. 6. Display Output the resultant matrix Create the object of Matrix class in main() function, perform matrix rotation and display the output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
