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:

  1. Use std::array to store the data
  2. Default constructor which should initialize everything to zero
  3. Initializer constructor that will set every item, if any item is missing you should throw std::runtime_error
  4. Copy constructor
  5. Copy assignment
  6. Comparison ==, !=
  7. Row and column count functions
  8. Subscript operator
  9. Stream insert and extraction operators
  10. +, -, * operators between two matrices
  11. * / between a matrix and a numeric value (numeric value should be allowed either side of the matrix)
  12. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!