Question: In c++ Note : dont use the double pointer notion .. instead use one 1d dynamic array flttened that does the job of 2d. Define

In c++ Note : dont use the double pointer notion .. instead use one 1d dynamic array "flttened" that does the job of 2d. Define a templated class that represents two dimensional arrays. include at least a constructor, an element access method, a resize method, and a destructor. Using your class, write a function that performs integer matrix multiplication. Here is an example that performs this matrix multiplication ( 1 2 1 ) ( 2 1 ) ( 5 9 ) ( 2 1 3 ) x ( 0 3 ) = ( 13 11 ) ( 3 2 ) int main() { twoDarray A(2, 3), B(3, 2), C(1, 1); A.get(0, 0) = 1; A.get(0, 1) = 2; A.get(0, 2) = 1; A.get(1, 0) = 2; A.get(1, 1) = 1; A.get(1, 2) = 3; B.get(0, 0) = 2; B.get(0, 1) = 1; B.get(1, 0) = 0; B.get(1, 1) = 3; B.get(2, 0) = 3; B.get(2, 1) = 2; multiply(A, B, C); print(C); } But you should test your implementation of the class more thoroughly than just trying that one example. 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!