We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbef879 commit 165784aCopy full SHA for 165784a
src/main/java/calculator/Validation.java
@@ -0,0 +1,13 @@
1
+package calculator;
2
+
3
+import calculator.engine.enums.ConsoleMenu;
4
5
+public class Validation {
6
+ public static int checkConsoleNumber(int number){
7
+ if (number == ConsoleMenu.ONE.MenuNumber || number == ConsoleMenu.TWO.MenuNumber) {
8
+ return number;
9
+ } else {
10
+ throw new IllegalArgumentException("1번과 2번 중 하나를 선택해주세요.");
11
+ }
12
13
+}
0 commit comments