// CSE 142, Autumn 2010, Jessica Miller // This program uses static methods to draw ASCII art. public class Figures1 { public static void main(String[] args) { // draw hexagon drawHexagon(); // draw teacup drawTeacup(); // draw stop sign drawStopsign(); // draw hill drawHill(); } public static void drawHexagon() { drawTop(); drawBottom(); System.out.println(); } 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 drawTeacup() { drawBottom(); System.out.println("+--------+"); System.out.println(); } public static void drawStopsign() { drawTop(); System.out.println("| STOP |"); drawBottom(); System.out.println(); } public static void drawHill() { drawTop(); System.out.println("+--------+"); } }