-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDeptMain.java
More file actions
59 lines (44 loc) · 1.32 KB
/
DeptMain.java
File metadata and controls
59 lines (44 loc) · 1.32 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package dept;
import java.util.Scanner;
public class DeptMain {
public static void main(String[] args) {
DeptManager manager = new DeptManager(DeptDao.getInstance());
Scanner sc = new Scanner(System.in);
try {
// 1. 드라이버 로드
Class.forName("oracle.jdbc.driver.OracleDriver");
while(true) {
System.out.println("부서관리 프로그램");
System.out.println("-----------------------------------");
System.out.println("1. 부서 리스트");
System.out.println("2. 부서 정보 입력");
System.out.println("3. 부서 정보 수정");
System.out.println("4. 부서 정보 삭제");
System.out.println("5. 프로그램 종료");
System.out.println("-----------------------------------");
System.out.println("원하시는 기능의 번호를 입력해주세요.");
int num = Integer.parseInt(sc.nextLine());
switch(num) {
case 1 :
manager.deptList();
break;
case 2 :
manager.inputData();
break;
case 3 :
manager.editDept();
break;
case 4 :
manager.delDept();
break;
case 5 :
System.out.println("프로그램을 종료합니다.");
return;
}
}
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}