-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDrawOutlineOfBox.java
More file actions
39 lines (34 loc) · 956 Bytes
/
DrawOutlineOfBox.java
File metadata and controls
39 lines (34 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*****************************************************
Filename: DrawOutlineOfBox
Created by: Melissa B.
Created on: 29 March 2017
******************************************************/
public class DrawOutlineOfBox {
static final int TOPROWCOUNT = 10;
static final int DEEPCOUNT = 4;
public static void main(String[] args) {
printFullRow();
printMiddleRow();
printFullRow();
}
private static void printFullRow()
{
for(int i = 0; i < TOPROWCOUNT; i++)
{
System.out.print("*");
}
System.out.println("");
}
private static void printMiddleRow()
{
for(int i = 0; i < DEEPCOUNT; i++)
{
System.out.print("*");
for(int c = 0; c < 8; c++)
{
System.out.print(" ");
}
System.out.println("*");
}
}
}