Answered step by step
Verified Expert Solution
Question
1 Approved Answer
use c++ to write and ignore the sentence the class from the first portion Using the class from the first portion of the assignment, write
use c++ to write and ignore the sentence "the class from the first portion"
Using the class from the first portion of the assignment, write a program (called matrik_ops.cpp) that does the following: 1. Overloads the following operators using friend. Replicate the functionality of the add function from matrix.cpp Replicate the functionality of the subtraction function from matricapp Overload this to replicate the functionality of both the matrix multiplication and scalar multiplication functions from matrix.cpp This operator should be overloaded a total of 3 times Replicate the functionality of the print function from matrix.cpp Used in the following way: cout > matrix_instance: 2. Remove the five public functions of the Matrix class, and use only overloaded operators to perform the same functionality output as in the matrix.cpp . 3. Performs the following calculations and prints each result using the overloaded >> aperator Each of the four matrix mathematical methods should be called, each result stored in a new object . Be sure you invoke scalar multiplication once for each overloaded operator int Matrix Matrix int If the dimensions of the two matrices involved do not allow for the operation to be performed, skip performing this calculation, and display a message stating that she has been skipped For example, if I have a 3x4 matrix and a 4x2 matrix. I cannot add or suberact these together, but I can perform multiplication Each calculation should be printed with a full explanation For scalar multiplication, you can either use an integer literal or generate a random integer. Just be sure to print the value of the integer value as part of the output when performing this function. The calculation being performed should be explained the contents of each matrix or value involved should be printed and identified Compiling the Program Use the following command to compile your classes: 8+ -all -o coutput_name>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