// Miya Natsuhara // 07-05-2019 // CSE142 // TA: Grace Hopper // Prints a bunch of lines and boxes of asterisks. /* 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.)) This was our initial version of the program, with very redundant methods for printing a line of stars and for printing boxes of stars. */ public class MyStarsInitial { public static void main(String[] args) { lineOf5(); lineOf12(); lineOf9(); System.out.println(); boxOf3x7(); System.out.println(); boxOf7x3(); System.out.println(); boxOf5x5(); System.out.println(); boxOf10x5(); } // Prints a line of 5 stars public static void lineOf5() { for (int i = 1; i <= 5; i++) { System.out.print("*"); } System.out.println(); } // Prints a line of 9 stars public static void lineOf9() { for (int i = 1; i <= 9; i++) { System.out.print("*"); } System.out.println(); } // Prints a line of 12 stars public static void lineOf12() { for (int i = 1; i <= 12; i++) { System.out.print("*"); } System.out.println(); } // Prints a 3x7 box of stars public static void boxOf3x7() { for (int i = 1; i <= 3; i++) { System.out.print("*"); } System.out.println(); for (int i = 1; i <= 5; i++) { System.out.print("*"); for (int j = 1; j <= 1; j++) { System.out.print(" "); } System.out.println("*"); } for (int i = 1; i <= 3; i++) { System.out.print("*"); } System.out.println(); } // Prints a 7x3 box of stars public static void boxOf7x3() { for (int i = 1; i <= 7; i++) { System.out.print("*"); } System.out.println(); for (int i = 1; i <= 1; i++) { System.out.print("*"); for (int j = 1; j <= 5; j++) { System.out.print(" "); } System.out.println("*"); } for (int i = 1; i <= 7; i++) { System.out.print("*"); } System.out.println(); } // Prints a 5x5 box of stars public static void boxOf5x5() { for (int i = 1; i <= 5; i++) { System.out.print("*"); } System.out.println(); for (int i = 1; i <= 3; i++) { System.out.print("*"); for (int j = 1; j <= 3; j++) { System.out.print(" "); } System.out.println("*"); } for (int i = 1; i <= 5; i++) { System.out.print("*"); } System.out.println(); } // Prints a 10x5 box of stars public static void boxOf10x5() { for (int i = 1; i <= 10; i++) { System.out.print("*"); } System.out.println(); for (int i = 1; i <= 3; i++) { System.out.print("*"); for (int j = 1; j <= 8; j++) { System.out.print(" "); } System.out.println("*"); } for (int i = 1; i <=10; i++) { System.out.print("*"); } System.out.println(); } }