// Brett Wortzman // CSE142 // Section: ZZ // TA: Grace Hopper // // Prints out two diamonds and one X. // // DEVELOPMENT NOTES: // (These notes would not be in your program's comments. They are here // to help you understand important topics or elements of this code.) // // Second attempt at this program. // // This version of the program has been improved by factoring the large // figures each into their own method. This both reduces redunancy and // adds structure to the program. // public class Figure2 { public static void main(String[] args) { drawDiamond(); drawDiamond(); drawX(); } // Draws a diamond shape. public static void drawDiamond() { System.out.println(" /\\"); System.out.println(" / \\"); System.out.println("/ \\"); System.out.println("\\ /"); System.out.println(" \\ /"); System.out.println(" \\/"); System.out.println(); } // Draws an X shape. public static void drawX() { System.out.println("\\ /"); System.out.println(" \\ /"); System.out.println(" \\/"); System.out.println(" /\\"); System.out.println(" / \\"); System.out.println("/ \\"); } }