@Override
  ArrayResult executeOperation() {
    //number of rows in result matrix is equal to number of columns in input matrix and vice versa
    var arrayInput = (ArrayInput) this.getReceivedData();
    final var rows = arrayInput.data[0].length;
    final var cols = arrayInput.data.length;
    var resultData = new int[rows][cols];
    for (var i = 0; i < cols; i++) {
      for (var j = 0; j < rows; j++) {
        //flipping element positions along diagonal
        resultData[j][i] = arrayInput.data[i][j];
      }
    }
    return new ArrayResult(resultData);
  }
@Test
  void executeOperationTest() {
    var atm = new ArrayTransposeMaster(1);
    var atw = new ArrayTransposeWorker(atm, 1);
    var matrix = new int[][]{{2, 4}, {3, 5}};
    var matrixTranspose = new int[][]{{2, 3}, {4, 5}};
    var i = new ArrayInput(matrix);
    atw.setReceivedData(atm, i);
    var r = atw.executeOperation();
    assertTrue(ArrayUtilityMethods.matricesSame(r.data, matrixTranspose));
  }