/* /\ / \ / \ / \ |--/\--| | \/ | | | | | | | | | | -- | \/ \/ */ public class Duke { public static final int SCALE = 4; public static void main(String[] args) { drawHead(); drawBeak(); drawBody(); drawLegs(); System.out.println(" see other Duke images at https://duke.dev.java.net/"); } public static void drawHead() { for (int line = 1; line <= SCALE; line++) { for (int col = 1; col <= SCALE - line; col++) System.out.print(' '); System.out.print('/'); for (int col = 1; col <= 2* line - 2; col++) System.out.print(' '); System.out.println('\\'); } // end for each line } // end drawHead public static void drawBeak() { System.out.print('|'); for (int col = 1; col <= SCALE / 2; col++) System.out.print('-'); System.out.print('/'); for (int col = 1; col <= SCALE - 4; col++) System.out.print('-'); System.out.print('\\'); for (int col = 1; col <= SCALE / 2; col++) System.out.print('-'); System.out.println('|'); System.out.print('|'); for (int col = 1; col <= SCALE / 2; col++) System.out.print(' '); System.out.print('\\'); for (int col = 1; col <= SCALE - 4; col++) System.out.print('-'); System.out.print('/'); for (int col = 1; col <= SCALE / 2; col++) System.out.print(' '); System.out.println('|'); } // end drawBeak public static void drawBody() { for (int line = 1; line <= SCALE; line++) { System.out.print('|'); for (int col = 1; col <= 2 * SCALE - 2; col++) System.out.print(' '); System.out.println('|'); } // end for each line } // end drawBody public static void drawLegs() { System.out.print("| "); for (int col = 1; col <= 2 * SCALE - 6; col++) System.out.print('-'); System.out.println(" |"); System.out.print(" \\/"); for (int col = 1; col <= 2 * SCALE - 6; col++) System.out.print(' '); System.out.println("\\/"); } // end drawLegs }