Skip to content

Commit 1172864

Browse files
committed
fix: enum 클래스 수정
1 parent 979514d commit 1172864

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package calculator.engine.enums;
22

33
public enum ConsoleMenu {
4-
ONE,TWO
4+
ONE(1),TWO(2);
5+
6+
private final int MenuNumber;
7+
8+
ConsoleMenu(int menuNumber) {
9+
MenuNumber = menuNumber;
10+
}
511
}
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
package calculator.engine.enums;
22
public enum Operators {
3-
PLUS,MINUS,DIVISION,MULTIPLICATION
3+
PLUS('+'),MINUS('-'),DIVISION('/'),MULTIPLICATION('*');
4+
5+
private final char operator;
6+
7+
Operators(char operator) {
8+
this.operator = operator;
9+
}
410
}

0 commit comments

Comments
 (0)