/* Marty Stepp CSE 142, Summer 2005 (Instructor: Marty Stepp) This program draws some delicious eggs. I sure am hungry! */ public class Shapes3 { public static void main(String[] args) { printEgg(); // Put a blank line between the eggs. System.out.println(); printLargeEgg(); printBrokenEgg(); // L33T W00T R0X0RZ printTopHalfOfEgg(); } // This method prints an egg-like figure to the console. public static void printEgg() { printTopHalfOfEgg(); printBottomHalfOfEgg(); } /* This method prints a larger egg figure, similar to printEgg but with vertical lines in the middle. */ public static void printLargeEgg() { printTopHalfOfEgg(); /* I didn't make this its own method, because it isn't used more than once and isn't a major part of the main program. */ System.out.println("| |"); System.out.println("| |"); System.out.println("| |"); printBottomHalfOfEgg(); } /* This method prints a "broken" egg with a top half and a line underneath. */ public static void printBrokenEgg() { printTopHalfOfEgg(); System.out.println(" +-------+"); } /* This method prints the top half of an egg. It is used by the other methods. */ public static void printTopHalfOfEgg() { System.out.println(" _____"); System.out.println(" / \\"); System.out.println(" / \\"); } /* This method prints the bottom half of an egg. It is used by the other methods. */ public static void printBottomHalfOfEgg() { System.out.println(" \\ /"); System.out.println(" \\_____/"); } }