Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The displayBoard method currently prints the game board without any formatting.

ID: 3619709 • Letter: T

Question

The displayBoard method currently prints the game board without any
formatting. It should print the board as displayed in the comments for the
method.

public static void displayBoard(final char[][] theBoard) {
// note the final parameter - we won't change the board, just print it.

// Need to format the board display to look like this:
// | |
// -----
// | |
// -----
// | |

for (int row = 0; row < board_size; row++) {
for (int col = 0; col < board_size; col++) {
System.out.print(theBoard[row][col]); // row always comes first in a 2d array
}
System.out.println();
}
}

Explanation / Answer

please rate - thanks
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote