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

JAVA!!! UTF-8 Method /** * Prints the game boards as viewed by the user. This me

ID: 3728665 • Letter: J

Question

JAVA!!! UTF-8 Method

/**
* Prints the game boards as viewed by the user. This method is used to print the
* game boards as the user place his ships and also during the gameplay.
*
* Some notes on the display:
* - Each column printed will have a width of Config.MAX_COL_WIDTH.
* - Each row is followed by an empty line.
* - The values in the headers and cells are to be right justified.
*
* @param board The board to print.
* @param caption The board caption.
*/
public static void printBoard(char board[][], String caption) {
//FIXME
}

CONFIG

Explanation / Answer

/** * Prints the game boards as viewed by the user. This method is used to print the * game boards as the user place his ships and also during the gameplay. * * Some notes on the display: * - Each column printed will have a width of Config.MAX_COL_WIDTH. * - Each row is followed by an empty line. * - The values in the headers and cells are to be right justified. * * @param board The board to print. * @param caption The board caption. */ public static void printBoard(char board[][], String caption) { System.out.println(caption); for(int i = 0; i