You are supposed to construct a class named Matrix that shall contains private data member  matrix: integer type array of size 3 by 3; Define a constructor that should have default parameters that can set all elements to 0. Moreover, define a function called setMatrixValues(int matrixArray[3][3]) that can assign values of matrixArray (provided to the function in argument) to the matrix array (data member of the class Matrix) of the class. Along with it, define a function called displayMatrix() that can display all values of the matrix.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 17PE
icon
Related questions
Question

Solve using c++.

You are supposed to construct a class named Matrix that shall contains private data member
 matrix: integer type array of size 3 by 3;
Define a constructor that should have default parameters that can set all elements to 0. Moreover,
define a function called setMatrixValues(int matrixArray[3][3]) that can assign values of
matrixArray (provided to the function in argument) to the matrix array (data member of the class
Matrix) of the class. Along with it, define a function called displayMatrix() that can display all
values of the matrix.

Moreover, you are instructed to construct a program that can perform operator overloading for
the following operators + (plus), - (minus), and == (equal).

Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning