// Sample program that produces output with two diamonds and an X. This // version has good structure but still has redundancy. public class Figure2 { public static void main(String[] args) { drawDiamond(); drawDiamond(); drawX(); } 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(); } public static void drawX() { System.out.println("\\ /"); System.out.println(" \\ /"); System.out.println(" \\/"); System.out.println(" /\\"); System.out.println(" / \\"); System.out.println("/ \\"); } }