-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathOutputView.java
More file actions
43 lines (35 loc) · 1.18 KB
/
OutputView.java
File metadata and controls
43 lines (35 loc) · 1.18 KB
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
40
41
42
43
package view;
import java.util.List;
import java.util.Map;
public class OutputView {
public void printLadder(List<String> participants, List<String> lines, List<String> results) {
System.out.println();
System.out.println("실행결과");
for (String name : participants) {
System.out.print(String.format("%-5s", name));
}
System.out.println();
for (String line : lines) {
System.out.println(line);
}
for (String result : results) {
System.out.print(String.format("%-5s", result));
}
System.out.println();
}
public void printSingleResult(String name, String result) {
System.out.println();
System.out.println("실행결과");
System.out.println(result);
}
public void printAllResults(Map<String, String> results) {
System.out.println();
System.out.println("실행결과");
for (Map.Entry<String, String> entry : results.entrySet()) {
System.out.println(entry.getKey() + " : " + entry.getValue());
}
}
public void printError(String message) {
System.out.println(message);
}
}