Question: Make its Header File, cpp File and I am Providing 2 G-Tests, Your Program (Header File ) Should have to pass that G-Tests #include pch.h

Make its Header File, cpp File and I am Providing 2 G-Tests, Your Program (Header File ) Should have to pass that G-Tests
#include "pch.h"
#include"../(address of headerfile)"
TEST(matrixMult,T1){ int mat1[4][4] = { { 1, 1, 1, 1 },{ 2, 2, 2, 2 },{ 3, 3, 3, 3 },{ 4, 4, 4, 4 } };// 4*4 int mat2[4][4] = { { 1, 1, 1, 1 },{ 2, 2, 2, 2 },{ 3, 3, 3, 3 },{ 4, 4, 4, 4 } };//4*4 EXPECT_EQ(400,multiplyMatrix(mat1,mat2,4,4,4,4)) }
TEST(matrixMult,T2){ int mat1[4][4] = { { 1, 1, 1, 1 },{ 2, 2, 2, 2 },{ 3, 3, 3, 3 },{ 4, 4, 4, 4 } };// 4*4 int mat2[4][3] = { { 1, 1, 1, 1 },{ 2, 2, 2, 2 },{ 3, 3, 3, 3 } };//3*4
EXPECT_EQ(240,mat1,mat2,4,4,4,3); }
4. This sample problem requires you to multiply 2 matrices and given the sum of the resultant matrix. For example, given the matrices M and N, you are required to multiple these matrices. Let A be the resultant matrix. Thenyour final answer should be element-wise sum of A. Note that the dimensions of M and N must match. The only operation allowed is transpose (i.e. changing the rows into columns and columns into rows). If the dimensions of N does not match with those of M, you try to take the transpose of N. Example 1 2 3 4 5 6 7 8 9 10 11 12 M= N= 1 0 3 4 5 6 1 8 0 0 0 12 A= 26 52 48 26 58 132 96 58 90 212 144 90 Answer is 26+52+48+26+58+132+96+58+90+212+144+90 = 858
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
