Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C ++ Programming help 1. Print the Matrix 2. Perform an addition of the matrix with itself 3. Get the maximum value in the matrix
C ++ Programming help
1. Print the Matrix 2. Perform an addition of the matrix with itself 3. Get the maximum value in the matrix 4. Find whether an element exists in the matrix 5. Change an existing element in the matrix 6. Perform matrix multiplication 7. Transpose of a matrix Which operations would you like to perform on the matrix: 7 Enter 1 This will print the Matrix that the function "createMatrix () "reads in from the file "input.txt" Enter 2 This will perform the addition of the matrix with itself using the "addMatrix()" function. You will see the following results Next, implement the functionality of number 3 - Get the maximum value in the matrix. See how other functions in the "matrix.cpp" and "matrix.h" are defined and code the "getMax()" function. Use the "grid" matrix as the base matrix. After implemented, the following should be printed in the terminal Which operations would you like to perform on the matrix: 3 16 Next, implement the functionality of number 4 - Find whether an element exists in the matrix. See how other functions in the "matrix.cpp" and "matrix.h" are defined and code the "findElement(int no)" function. Use the "grid" matrix as the base matrix. After implemented, the following should be printed in the terminal Next, implement the functionality of number 3 - Get the maximum value in the matrix. See how other functions in the "matrix.cpp" and "matrix.h" are defined and code the "getMax()" function. Use the "grid" matrix as the base matrix. After implemented, the following should be printed in the terminal Which operations would you like to perform on the matrix: 3 16 Next, implement the functionality of number 4 - Find whether an element exists in the matrix. See how other functions in the "matrix.cpp" and "matrix.h" are defined and code the "findElement(int no)" function. Use the "grid" matrix as the base matrix. After implemented, the following should be printed in the terminal Which operations would you like to perform on the matrix: 4 Enter the number to find: 6 Element found at 1,1 Next, implement the functionality of number 5 - Change the element in matrix. This will ask the user to provide a valid row and column number of an element in the matrix and replace it with the provided number. See how other functions in the "matrix.cpp" and "matrix.h" are defined and code the "changeElement(int r, int c, int no)" function. After implemented, the following should be printed in the terminal Enter the row of the element to change: 1 Enter the column of the element to change: 0 Enter the value to replace: 99 Next, implement the functionality of number 6 - Perform matrix multiplication See how other functions in the "matrix.cpp" and "matrix.h" are defined and code the "multiplyMatrix()" function. Use the "grid" matrix as the base matrix and store the multiplication result in "grid_temp". Print the contents of "grid_temp" once done. Refer to the "addMatrix()" function Next, implement the functionality of number 5 - Change the element in matrix. This will ask the user to provide a valid row and column number of an element in the matrix and replace it with the provided number. See how other functions in the "matrix.cpp" and "matrix.h" are defined and code the "changeElement(int r, int c, int no)" function. After implemented, the following should be printed in the terminal Enter the row of the element to change: 1 Enter the column of the element to change: 0 Enter the value to replace: 99 Next, implement the functionality of number 6 - Perform matrix multiplication See how other functions in the "matrix.cpp" and "matrix.h" are defined and code the "multiplyMatrix()" function. Use the "grid" matrix as the base matrix and store the multiplication result in "grid_temp". Print the contents of "grid_temp" once done. Refer to the "addMatrix ()"function After implemented, the following should be printed in the terminal Which operations would you like to perform on the matrix: 6 Next, implement the functionality of number 7 - Transpose of a matrix. See how other functions in the "matrix.cpp" and "matrix.h" are defined and code the "transposeMatrix()" function. Use the "grid" matrix as the base matrix and store the multiplication result in "grid_temp". Print the contents of "grid_temp" once done. After implemented, the following should be printed in the terminal Which operations would you like to perform on the matrix: 7
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started