// Helene Martin, CSE 142 // Prints a sign, a boat, a stop sign and a hat made of characters. // This version adds methods to reduce redundancy. Main is still // a concise summary of the overall program structure. public class Figures2 { public static void main(String[] args) { drawHexagon(); System.out.println(); drawBoat(); System.out.println(); drawStopSign(); System.out.println(); drawHat(); } public static void drawHexagon() { drawTop(); drawBottom(); } public static void drawBoat() { drawBottom(); drawLine(); } public static void drawStopSign() { drawTop(); System.out.println("| STOP |"); drawBottom(); } public static void drawHat() { drawTop(); drawLine(); } public static void drawTop() { System.out.println(" ______"); System.out.println(" / \\"); System.out.println("/ \\"); } public static void drawBottom() { System.out.println("\\ /"); System.out.println(" \\______/"); } public static void drawLine() { System.out.println("+--------+"); } }