From f3db915fdc4697fdbf2437c5e4e37f4d2f8c10b5 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Tue, 18 Apr 2017 19:33:06 +0200 Subject: [PATCH] Transformed FormUtil to English Signed-off-by: Jim Martens --- 02/src/de/dis2017/FormUtil.java | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/02/src/de/dis2017/FormUtil.java b/02/src/de/dis2017/FormUtil.java index badc886..3e4e00e 100644 --- a/02/src/de/dis2017/FormUtil.java +++ b/02/src/de/dis2017/FormUtil.java @@ -5,15 +5,16 @@ import java.io.IOException; import java.io.InputStreamReader; /** - * Kleine Helferklasse zum Einlesen von Formulardaten + * Small helper class for forms. */ public class FormUtil { /** - * Liest einen String vom standard input ein - * @param label Zeile, die vor der Eingabe gezeigt wird - * @return eingelesene Zeile + * Reads a string from the console. + * + * @param label Label that is shown before the input + * @return read string */ - public static String readString(String label) { + static String readString(String label) { String ret = null; BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); @@ -28,9 +29,10 @@ public class FormUtil { } /** - * Liest einen Integer vom standard input ein - * @param label Zeile, die vor der Eingabe gezeigt wird - * @return eingelesener Integer + * Reads an integer from the console. + * + * @param label Label that is shown before the input + * @return read integer */ public static int readInt(String label) { int ret = 0; @@ -43,7 +45,7 @@ public class FormUtil { ret = Integer.parseInt(line); finished = true; } catch (NumberFormatException e) { - System.err.println("Ungültige Eingabe: Bitte geben Sie eine Zahl an!"); + System.err.println("Invalid input: Please insert a valid number!"); } }