Matrix Transpose ISC Computer Science 2009 Theory
A transpose of an array is obtained by interchanging the elements of the rows and columns. A class Transarray contains a two-dimensional integer array of order (m × n). The maximum value possible for both 'm' and 'n' is 20. Design a class Transarray to find the transpose of a given matrix. The details of the members of the class are given below: Class name : Transarray Data members/instance variables : arr[][]: stores the matrix elements m: integer to store the number of rows n: integer to store the number of columns Member functions : Transarray(): default constructor Transarray(int row, int col): to initialize the size of the matrix as m = row, n = col void fillArray(): to enter the elements of the matrix void transpose(Transarray a): to find the transpose of a given matrix void dispArray(): displays the array in a matrix form Specify the class Transarray giving details of the constructors, void fillArray(), void transpose(Transarray) and void dispArray(). You need ...