Question: Please answer each CLEARLY and LEGIBLE Write a C++ program to declare a class called Matrix. The private data of the class are row, column,
Write a C++ program to declare a class called Matrix. The private data of the class are row, column, and matrix. The member functions are as follows: 1) member function constructor Matrix to initialize the content of the matrix to zero; 2) a function friend Read_Matrix; 3) member function Transpose_MatrixO; and 4) Display_MatrixO. In the main function, do as follows: 1. Declare object Matrix_A; Declare object Matrix_B; Call friend Transpose_Matrix to find transpose of Matrix_A and store the result in Matix B .Call Matrix_A.Display_MatrixO Call Matrix_B.Display_MatrixO 2. Modify the class bank program to add a static variable counter type of integer as a private data. 3. Modify Program 18h by changing the class name to Shape instead of Rectangle. Add a member 4. Modify Program 18c and write the definition of the overloaded operator+O function inline. Modify the constructor function BankO to increment the counter when an object is created. Test your program for ten objects. Modify the display function to display the counter variable Height type of double as private data. Initialize Height to Zero in the ShapeO constructor. In the main program declare object Cube type of Shape. Compute volume and display it
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
