Question: Can anyone help me with this assignment? Problem 1: Design, implement and test the Matrix class. The elements of Matrix should be of the integer

Can anyone help me with this assignment?

Problem 1: Design, implement and test the Matrix class. The elements of Matrix should be of the integer type. Your Matrix class should contain at least the following features, namely:

A default constructor that sets the matrix elements to zero.

A copy constructor

A destructor

The get and set functions

Overloaded functions for as many relevant C++ built-in operators as you can (the number of overloaded operators will be one of the factors to be used in determining your grade in this mini-project). This should include the overloading of operators such as matrix negation - (a unary operator that multiplies each element of a matrix with -1), matrix pre-increment ++, matrix pre-decrement --, matrix assignment =, matrix addition + (adds two matrices to generate a sum matrix, matrix subtraction -, matrix multiplication * (vector multiplication), matrix +=, matrix equality = = and matrix inequality !=

Overload the operator( ) to perform the double scripting operations. For example, in a 3-by-5 Matrix called A, the programmer could write A (1, 3) to access the element at row 1 and column 3. There should be two versions of operator ( ), one that returns int & and one that returns const int &.

Overload the insertion << operator (to output the entire Matrix in a row-major format) and the extraction >> (to input an entire matrix in a row-major format).

Make sure that the implemented operators should be able to cascade

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!