-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAdminUI.java
More file actions
58 lines (53 loc) Β· 2.44 KB
/
AdminUI.java
File metadata and controls
58 lines (53 loc) Β· 2.44 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
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class AdminUI
{
public static final int salesManage = 1;
public static final int salesRatio = 2;
public static final int checkChange = 3;
public static final int addChange = 4;
public static final int cafeClose = 5;
public static final int back = 6;
public static int sel = 1;
public static void adminDisp() // λ©λ΄ μΆλ ₯ λ©μλ
{
System.out.println("ββββββββββββββββββββββββββββββββββββββββββββββββββββββ");
System.out.printf("β [νμν©λλ€, %s λ] β\n", AdminLogin.getId());
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("β 6. κ΄λ¦¬μλ©λ΄ μ’
λ£ β");
System.out.println("ββββββββββββββββββββββββββββββββββββββββββββββββββββββ");
System.out.print("\n>> λ©λ΄ μ ν (1 ~ 6) : ");
}
public static void adminSelect() throws IOException, NumberFormatException // λ©λ΄μ ν λ©μλ
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
do
{
sel = Integer.parseInt(br.readLine());
if (sel < salesManage || sel > back)
{
System.out.println("\nμ
λ ₯κ°μ λ²μ΄λ¬μ΅λλ€.\n");
adminDisp(); // μ
λ ₯κ° λ²μ΄λ¬μμ λ©λ΄ λ€μμΆλ ₯
}
}
while (sel < salesManage || sel > back);
}
public static void adminRun() throws IOException // μ νν λ©λ΄μ€νμ λ°λ₯Έ κΈ°λ₯ νΈμΆ λ©μλ
{
switch (sel)
{
case salesManage: Sales.salesDisp(); break;
case salesRatio: Sales.drinkDisp(); break;
case checkChange: ChangeUI.checkChange(); break;
case addChange: ChangeUI.addChange(); break;
case cafeClose: Cat.close(); break;
case back: break;
}
}
}