-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuthGradeMain2.java
More file actions
25 lines (21 loc) · 951 Bytes
/
Copy pathAuthGradeMain2.java
File metadata and controls
25 lines (21 loc) · 951 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
package enumeration.test;
import java.io.*;
import static enumeration.test.AuthGrade.*;
public class AuthGradeMain2 {
public static void main(String[] args) throws IOException{
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
System.out.print("당신의 등급을 입력하세요 [GUEST, LOGIN, ADMIN] : ");
String input = bufferedReader.readLine();
AuthGrade grade = AuthGrade.valueOf(input.toUpperCase());
System.out.println();
System.out.println("당신의 등급은 " + grade.getDescription() + "입니다.");
if(grade.getLevel() > 0 ){
System.out.println("===메뉴 목록===");
System.out.println("-메인 화면");
}if (grade.getLevel() > 1){
System.out.println("-이메일 관리 화면");
}if (grade.getLevel() > 2) {
System.out.println("-관리자 화면");
}
}
}