Question: Write a C++ program to declare a class called Matrix. The private data of the class are Row, Column, and Matrix. The member functions are
Write a C++ program to declare a class called Matrix. The private data of the class are Row, Column, and Matrix. The member functions are as follows:
1. Member function constructor Matrix to initialize the content of the matrix to zero
2. Member function Read_Matrix()
3. Add_Matrices()
4. Subtract_Matrices
5. Display_Matrix()
In the main function do as follows
Declare object Matrix_A
Declare object Matrix_B
Declare object Matrix_C
Declare object Matrix_D
Call Matrix_A.Read_Matrix()
Call Matrix_B.Read_Matrix()
Add two matrices and store it in Matrix_C
Subtract two matrices and store it in Matrix_D
Call Matrix_A.Display_Matrix()
Call Matrix_b.Display_Matrix()
Call Matrix_C.Display_Matrix()
Call Matrix_D.Display_Matrix()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
