// Miya Natsuhara // 06-26-2019 // CSE142 // TA: Grace Hopper // This program will print out two diamonds, and then an X. /* DEVELOPMENT NOTES: ((Note: this is not something you should include in your own programs; this is included here to aid in your understanding and to provide additional context for the program.)) In our final version, we have further decomposed the common pieces that make up the diamond and X figures into their own methods to further reduce redundancy. Note that we do not replace the drawX() method call in main with calls to drawValley() and drawMountain(). While the method drawX() itself isn't reducing redundancy (since there is only one X in the output), keeping the drawX() method call from main still contributes to the structure of the program. This way, we can have method calls that show the structure of the output at a high level in main, and then can look inside of the drawDiamond() and drawX() methods to get more detail about what pieces are composed to create those figures, and look further down into the drawValley() and drawMountain() method calls to get an even deeper look into the exact commands used. This produces a nice hierarchy of level of detail, and good structure in our program! */ public class Figure3 { public static void main(String[] args) { drawDiamond(); drawDiamond(); drawX(); } public static void drawDiamond() { drawMountain(); drawValley(); System.out.println(); } public static void drawX() { drawValley(); drawMountain(); } public static void drawValley() { System.out.println("\\ /"); System.out.println(" \\ /"); System.out.println(" \\/"); } public static void drawMountain() { System.out.println(" /\\"); System.out.println(" / \\"); System.out.println("/ \\"); } }