@Override
    public void print() {
        System.out.println();
        System.out.println("Matrix" + rows + "x" + cols);
        System.out.println("-------------------------------------------------");

        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < cols; j++) {
                try {
                    System.out.printf("%8.3f ", this.getValue(i, j));
                } catch (MatrixIndexOutOfBoundsException e) {
                    System.out.println("Error: " + e);
                }
            }
            System.out.println();
        }
    }