Task 2 Write a class Matrix. This class has three private data members. rows: An integer that holds the numbers of rows for matrix. columns: An integer that holds the numbers of columns for matrix....


include .h file as well


c++


Task 2<br>Write a class Matrix. This class has three private data members.<br>rows: An integer that holds the numbers of rows for matrix.<br>columns: An integer that holds the numbers of columns for matrix.<br>matrix: An integer pointer to pointer that points to 2D array (rows x columns).<br>The class has the following member functions.<br>Constructs a new Matrix object to represent the given<br>matrix<br>Matrix (int r, int c)<br>d++<br>Overload Post-increment Operator<br>++d<br>Overload Pre-increment Operator<br>d--<br>Overload Post-decrement Operator<br>--d<br>Overload Pre-decrement Operator<br>void setRows(int r)<br>It sets row of a matrix.<br>int getRows()const<br>Returns row of matrix.<br>void setCol(int c)<br>It sets column of a matrix.<br>int getCol()const<br>Returns column of matrix.<br>

Extracted text: Task 2 Write a class Matrix. This class has three private data members. rows: An integer that holds the numbers of rows for matrix. columns: An integer that holds the numbers of columns for matrix. matrix: An integer pointer to pointer that points to 2D array (rows x columns). The class has the following member functions. Constructs a new Matrix object to represent the given matrix Matrix (int r, int c) d++ Overload Post-increment Operator ++d Overload Pre-increment Operator d-- Overload Post-decrement Operator --d Overload Pre-decrement Operator void setRows(int r) It sets row of a matrix. int getRows()const Returns row of matrix. void setCol(int c) It sets column of a matrix. int getCol()const Returns column of matrix.

Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here