|
@@ -23,10 +23,16 @@ public class Console {
|
23
|
23
|
}
|
24
|
24
|
|
25
|
25
|
public static Integer getIntegerInput(String prompt) {
|
26
|
|
- return null;
|
|
26
|
+ Scanner scanner = new Scanner(System.in);
|
|
27
|
+ println(prompt);
|
|
28
|
+ Integer userInput = scanner.nextInt();
|
|
29
|
+ return userInput;
|
27
|
30
|
}
|
28
|
31
|
|
29
|
32
|
public static Double getDoubleInput(String prompt) {
|
30
|
|
- return null;
|
|
33
|
+ Scanner scanner = new Scanner(System.in);
|
|
34
|
+ println(prompt);
|
|
35
|
+ Double userInput = scanner.nextDouble();
|
|
36
|
+ return userInput;
|
31
|
37
|
}
|
32
|
38
|
}
|