// Allison Obourn // prints shapes made of ASCII characters public class Stars { public static void main(String[] args) { line(13); line(7); line(35); box(10, 3); box(5, 4); } // prints any String str times number of times public static void repeat(String str, int times) { for (int i = 1; i <= times; i++) { System.out.print(str); } } // prints a line of stars number of stars followed by a new line public static void line(int stars) { repeat("*", stars); System.out.println(); } // prints a box of size width x height public static void box(int width, int height) { line(width); for (int line = 1; line <= height - 2; line++) { System.out.print("*"); repeat(" ", width - 2); System.out.println("*"); } line(width); } }