-
Notifications
You must be signed in to change notification settings - Fork 273
Expand file tree
/
Copy pathApplication.java
More file actions
37 lines (31 loc) · 1.1 KB
/
Copy pathApplication.java
File metadata and controls
37 lines (31 loc) · 1.1 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
package subway;
import subway.domain.*;
import java.util.Scanner;
public class Application {
public static void main(String[] args) {
final Scanner scanner = new Scanner(System.in);
Init.initialize();
startProgram(scanner);
}
public static void startProgram(Scanner kbd) {
View.showMainMenu();
String mainInput = InputView.inputFunction(kbd, Constants.MAIN_FUNCTIONS);
goSubMenu(mainInput, kbd);
}
public static void goSubMenu(String input, Scanner kbd) {
System.out.println();
if (input.equals(Constants.STATION_MENU))
StationManage.manageStation(kbd);
if (input.equals(Constants.LINE_MENU))
LineManage.manageLine(kbd);
if (input.equals(Constants.SECTION_MENU))
SectionManage.manageSection(kbd);
if (input.equals(Constants.PRINT_LINES))
View.displayAllLines(kbd);
if (input.equalsIgnoreCase(Constants.FINISH_PROGRAM))
finishProgram();
}
public static void finishProgram() {
System.out.println("## 프로그램 종료");
}
}