forked from chacha86/wise-mission-250801
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.java
More file actions
44 lines (26 loc) · 978 Bytes
/
App.java
File metadata and controls
44 lines (26 loc) · 978 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
40
41
42
43
44
package com.back;
import java.util.Scanner;
public class App {
Scanner sc = new Scanner(System.in);
WiseSayingController wiseSayingController = new WiseSayingController();
void run() {
System.out.println("== 명언 앱 ==");
while (true) {
System.out.print("명령) ");
String command = sc.nextLine();
if (command.equals("등록")) {
wiseSayingController.actionWrite();
} else if (command.equals("목록")) {
wiseSayingController.actionList();
} else if (command.startsWith("삭제")) {
Rq rq = new Rq(command);
wiseSayingController.actionDelete(rq);
} else if (command.startsWith("수정")) {
Rq rq = new Rq(command);
wiseSayingController.actionModify(rq);
} else if (command.equals("종료")) {
break;
}
}
}
}