123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
-
-
- import java.util.Scanner;
-
- import java.util.*;
-
-
- /**
- * Created by leon on 2/9/18.
- */
- public class Console extends DiplayMode {
-
- public static void print(String output, Object... args) {
- System.out.printf(output, args);
- }
-
- public static void println(String output, Object... args) {
- print(output + "\n", args);
- }
-
- public static void printResult(double result) {
- System.out.println("Result = " + result);
- }
-
- public static String getStringInput(String prompt) {
- Scanner scanner = new Scanner(System.in);
- println(prompt);
- String userInput = scanner.nextLine();
- return userInput;
- }
-
- public static Integer getIntegerInput(String prompt) {
- Scanner scanner_1 = new Scanner(System.in);
- println(prompt);
- Integer firstNumber = scanner_1.nextInt();
- return firstNumber;
- }
-
- public static double getDoubleInput(String prompt) {
- Scanner scanner = new Scanner(System.in);
- println(prompt);
- double userInput = scanner.nextDouble();
- return userInput;
- }
-
-
- }
|