Question: In this assignment you should write a fixed sized matrix class. This matrix class should take type, number of rows and number of columns as
In this assignment you should write a fixed sized matrix class. This matrix class should take type, number of rows and number of columns as template parameters. It should support following operations:
- Use std::array to store the data
- Default constructor which should initialize everything to zero
- Initializer constructor that will set every item, if any item is missing you should throw std::runtime_error
- Copy constructor
- Copy assignment
- Comparison ==, !=
- Row and column count functions
- Subscript operator
- Stream insert and extraction operators
- +, -, * operators between two matrices
- * / between a matrix and a numeric value (numeric value should be allowed either side of the matrix)
- An example program that demonstrates all features of your class
Submit a single zip file containing Matrix.h and Example.cpp
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
