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; iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.