From c474f98ba30290c1d0ed227d598e9351b7cfa69a Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Mon, 30 Jan 2023 18:29:55 +0100 Subject: [PATCH] menue toString wieder hergestellt --- .../java/com/example/vpr_javafx/Menu.java | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/example/vpr_javafx/Menu.java b/src/main/java/com/example/vpr_javafx/Menu.java index 5fe5db1..47296bd 100644 --- a/src/main/java/com/example/vpr_javafx/Menu.java +++ b/src/main/java/com/example/vpr_javafx/Menu.java @@ -60,14 +60,24 @@ public class Menu { /** - * The method toString() returns a String formated to save in a File + * The method format() returns a String formated to save in a File * * @return a String with dish, sideDish, list of ingredients and the typ of the menu - * @author Madeleine Vigier, Felix Wöstemeyer + * @author Felix Wöstemeyer + */ + public String format() { + return date + ";" + dish + ";" + sideDish + ";" + type + ";" + ingredients; + } + + /** + * The method toString() returns fomated dishdata + * @return a String with dish, sideDish, list of ingredients and the typ of the menu + * @author Madeleine Vigier */ @Override public String toString() { - return date+";"+dish+";"+sideDish+";"+type+";"+ingredients; + return dish + '\n' + + sideDish + '\n' + + type + '\n' + + ingredients; } -} -