Question: Use C++ Write the member functions to complete the following class. (5 points) Use nested for loops to construct the matrix. (5 points) Use nested

Use C++
Write the member functions to complete the following class. (5 points) Use nested for loops to construct the matrix. (5 points) Use nested for loops to print the matrix. (5 points) Print the matrix in the specified format. (5 points) The size function returns the size n of the n-by-n matrix. // Square identity matrix class I { public: // Constructs a size_' by "size_' square identity matrix IO; // Outputs matrix to console with each row on a new // line and a space between each value in a row: 100 010 001 void print const; // Returns the size of the matrix (you can think of std::size_t as int) std::size_t size const; private: static const std::size_t size_{ 3 }; int matrix_[size_][size_]; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
