Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi! Please write a C++ code that meets the requirements listed and comment each line. //The purpose of this code is to write a program
Hi! Please write a C++ code that meets the requirements listed and comment each line.
//The purpose of this code is to write a program that does integer matric addition, subtraction, and multiplication for 2 3x3 matrices.
//Rules: //1. Classs w member functions and private data answerArray /
/2. Use classes using private data member std::array,rows>answerArray
//3. Initialize answerArray to all zeros
Write a program that does integer matrix addition, matrix subtraction and matrix multiplication for matrices of size 3 by 3. Create a class that has the member functions and the private data answerArray. Include a constructor that initializes the two dimensional zeros. The array values may be hard coded into your program, you do not need to allow user input while running the program. Use classes to do this assignment using the private data member std:array* std: array* int, columns>, rows answerArray. The input data does not need to be entered at run time, the arrays may use data compiled into the program Run with several different examples to show you tested yor program. Include output from yor test program in what you tum in on T-Square. Use range-based for statements where possible. array answerArray to all Turm in pdfs of your test cases results by uploading them to canvase (please no JPEG or PNG or word upload a pdf doc for your test cases). Also in addition, upload the source code files (uncompiled) on or before the due date so your program may be tested. How your code is commented, how well you tested the program (just one test case or enough test cases to prove it works), any extra fumctionality, how you output your test results and details of program output will all be taken into consideration when grading your program Your format of your code should look like that of the book. Note the comments in the book above every fumction explaining what that function does. You should have comments at the top that includes your name, the date, explains what the program does and comments above the functions explaining what they do in addition to some comments as needed on lines that explain what that line does. An example output of only one test case, yours does not have to match exactly but should be similar
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