// Marty Stepp, CSE 142, Autumn 2007 // This is the final version of the Figures program. // It uses static methods to capture structure and remove redundancy. // // This text is a comment. Comments let us document or explain our programs. // The Java compiler ignores comments. (They aren't printed on the console.) // public class Figures3 { public static void main(String[] args) { egg(); cup(); stop(); hat(); } public static void egg() { eggTop(); eggBottom(); } public static void cup() { eggBottom(); line(); } public static void stop() { eggTop(); System.out.println("| STOP |"); eggBottom(); } public static void hat() { eggTop(); line(); } public static void eggTop() { System.out.println(" ______"); System.out.println(" / \\"); System.out.println("/ \\"); } public static void eggBottom() { System.out.println("\\ /"); System.out.println(" \\______/"); } public static void line() { System.out.println("+--------+"); } }