Question: Q5. [10 pts] (classes) Design a class named 'Matrix' containing constructor that initializes the number of rows and number of columns of a new Matrix
![Q5. [10 pts] (classes) Design a class named 'Matrix' containing constructor](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2e5b53a423_54866f2e5b46d886.jpg)
Q5. [10 pts] (classes) Design a class named 'Matrix' containing constructor that initializes the number of rows and number of columns of a new Matrix object. The Matrix class has methods for each of the following public methods: 1. get the number of rows 2. get the number of columns 3. set the elements of the matrix at given position (ij) 4. adding two matrices. If the matrices are not addable, "Matrices cannot be added" will be displayed. 5. multiplying the two matrices a. Implement the class Matrix. b. Write a test driver called TestMatrix to test all the public methods
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
