-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBorderMain.java
More file actions
26 lines (20 loc) · 870 Bytes
/
BorderMain.java
File metadata and controls
26 lines (20 loc) · 870 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
package practice;
public class BorderMain {
public static void main(String[] args) {
Display display1 = new StringDisplay("Hello, world.");
Display display2 = new SideBorder(display1, '#');
Display display3 = new SideBorder(new SideBorder( new StringDisplay("Hello Gurum"), '#'), '&');
Display display4 = new FullBorder( display3 );
System.out.println("1. 문자열을 출력합니다.");
display1.show();
System.out.println();
System.out.println("2. '#'으로 Side를 장식합니다.");
display2.show();
System.out.println();
System.out.println("3. '&'으로 Side를 장식합니다.");
display3.show();
System.out.println();
System.out.println("4. 모든 테두리를 장식합니다.");
display4.show();
}
}