/* Java application that "draws" a standard 8x8 checkerboard, in a ** rather naive way. To illustrate, output would look like this: ** ** +--------------------------------+ ** |**** **** **** **** | ** |**** **** **** **** | ** |**** **** **** **** | ** | **** **** **** ****| ** | **** **** **** ****| ** | **** **** **** ****| ** |**** **** **** **** | ** |**** **** **** **** | ** |**** **** **** **** | ** | **** **** **** ****| ** | **** **** **** ****| ** | **** **** **** ****| ** |**** **** **** **** | ** |**** **** **** **** | ** |**** **** **** **** | ** | **** **** **** ****| ** | **** **** **** ****| ** | **** **** **** ****| ** |**** **** **** **** | ** |**** **** **** **** | ** |**** **** **** **** | ** | **** **** **** ****| ** | **** **** **** ****| ** | **** **** **** ****| ** +--------------------------------+ ** ** A checkerboard has eight rows and eight columns of squares, each one ** alternating between black and white squares. (A black square is composed ** of asterisks, a white square of spaces.) We refer to a row whose ** leftmost square is black (respectively, white) as a BW (resp., WB) row. ** ** Authors: R. McCloskey, P. M. Jackowitz ** Date: Aug. 2019 */ public class DrawCheckerBoardPoor { /* The main() method simply calls the method that draws the checkerboard. */ public static void main(String[] args) { drawBoard(); } /* Draws the checkerboard. */ public static void drawBoard() { // Draw boundary at top of board. System.out.println("+--------------------------------+"); // Draw the first BW row. System.out.println("|**** **** **** **** |"); System.out.println("|**** **** **** **** |"); System.out.println("|**** **** **** **** |"); // Draw the first WB row. System.out.println("| **** **** **** ****|"); System.out.println("| **** **** **** ****|"); System.out.println("| **** **** **** ****|"); // Draw the second BW row. System.out.println("|**** **** **** **** |"); System.out.println("|**** **** **** **** |"); System.out.println("|**** **** **** **** |"); // Draw the second WB row. System.out.println("| **** **** **** ****|"); System.out.println("| **** **** **** ****|"); System.out.println("| **** **** **** ****|"); // Draw the third BW row. System.out.println("|**** **** **** **** |"); System.out.println("|**** **** **** **** |"); System.out.println("|**** **** **** **** |"); // Draw the third WB row. System.out.println("| **** **** **** ****|"); System.out.println("| **** **** **** ****|"); System.out.println("| **** **** **** ****|"); // Draw the fourth BW row. System.out.println("|**** **** **** **** |"); System.out.println("|**** **** **** **** |"); System.out.println("|**** **** **** **** |"); // Draw the fourth WB row. System.out.println("| **** **** **** ****|"); System.out.println("| **** **** **** ****|"); System.out.println("| **** **** **** ****|"); // Draw boundary at bottom of board. System.out.println("+--------------------------------+"); } }