Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions Hourglass.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,44 +61,4 @@ public static void drawBottom() {
}
}
}
eroeder
Commit new file

}

// Produces the top half of the hourglass figure
public static void drawTop() {
for (int line = 1; line <= SUB_SIZE; line++) {
for (int i = 1; i <= line; i++) {
System.out.print(" ");
}
System.out.print("\\");
for (int i = 1; i <= 2*(SUB_SIZE +1 - line); i++) {
System.out.print(":");
}
System.out.println("/");
}
}

// Produces the belt section of the hour glass.
public static void drawMiddle() {
for (int i = 1; i <= SUB_SIZE +1; i++) {
System.out.print(" ");
}
System.out.println("||");
}

// Produces the bottom half of the hourglass figure.
public static void drawBottom() {
for (int line = 1; line <= SUB_SIZE; line++) {
for (int i = 1; i <= SUB_SIZE + 1 -line; i++) {
System.out.print(" ");
}
System.out.print("/");
for (int i = 1; i <= 2 * line; i++) {
System.out.print(":");
}
System.out.println("\\");
}
}
}