Question: Please code in C++: Many mathematical problems require the addition, subtraction, and multiplication of two matrices. Write an ADT Matrix. You may use the following
Please code in C++:


Many mathematical problems require the addition, subtraction, and multiplication of two matrices. Write an ADT Matrix. You may use the following class definition. const int MAX_ROWS = 10; const int MAX COLS = 10; class MatrixType public: MatrixType(); void MakeEmpty(); void Set Size (int rows Size, int colSize); void StoreItem(int item, int row, int col); void Add (MatrixType otherOperand, MatrixType& result); void Sub (MatrixType otherOperand, MatrixType & result); void Mult (MatrixType otherOperand, MatrixType & result); void Print (ofstream& outfile); bool AddSub Compatible (MatrixType otherOperand); bool Mult Compatible (MatrixType otherOperand); private: int values [MAX_ROWS] [MAX_COLS]; int numRows; int numCols; Before you start looking at how to implement this class, you must determine and document the appropriate preconditions and postconditions for each operation. Note that the class provides the member functions to allow the client to determine if the binary matrix operations are possible. Before this class can become a permanent part of your program library, it must be thoroughly tested. Write a menu driven testing program to test your MatrixType. Menu Driven Testing Interface The menu should contain the following options. (See processing notes for definition of
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
