From 27461d85166525fa562802e2f1bf09e65caf14bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20D=C3=BCsterhaus?= Date: Thu, 24 Nov 2022 14:21:59 +0100 Subject: [PATCH 1/4] testcommit --- .idea/runConfigurations.xml | 10 ++++++++++ src/FDtest.java | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 .idea/runConfigurations.xml create mode 100644 src/FDtest.java diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/src/FDtest.java b/src/FDtest.java new file mode 100644 index 0000000..e893fba --- /dev/null +++ b/src/FDtest.java @@ -0,0 +1,2 @@ +public class FDtest { +} From 5740d64bbb7de2d544b58037df46aa5fd995c069 Mon Sep 17 00:00:00 2001 From: Kevin Pfannenstiel Date: Thu, 24 Nov 2022 14:22:24 +0100 Subject: [PATCH 2/4] Test --- .idea/runConfigurations.xml | 10 ++++++++++ src/TestKlasse.java | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100644 .idea/runConfigurations.xml create mode 100644 src/TestKlasse.java diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/src/TestKlasse.java b/src/TestKlasse.java new file mode 100644 index 0000000..eeef9d2 --- /dev/null +++ b/src/TestKlasse.java @@ -0,0 +1,7 @@ +public class TestKlasse { + + public String Satz() + { + return "Satz"; + } +} From 2027877b112f56a9be61270668b49865bd120e62 Mon Sep 17 00:00:00 2001 From: Sabine Gubitz Date: Thu, 24 Nov 2022 14:22:56 +0100 Subject: [PATCH 3/4] Added Code for review - entscheidung welche GeneralMethods datei genutzt werden soll ausstehend --- src/GeneralMethods.java | 90 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/src/GeneralMethods.java b/src/GeneralMethods.java index 872442d..9698aa1 100644 --- a/src/GeneralMethods.java +++ b/src/GeneralMethods.java @@ -2,6 +2,7 @@ import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.nio.file.Files; +import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; @@ -50,4 +51,93 @@ public class GeneralMethods { e.printStackTrace(); } } + + + /** + * Folgender Code von Sabine, zum gegen prüfen und entscheiden + */ + /** + * The method read Data interprets a file and returns an useable list for other methods. + * Files to be read have to use : as a divider between attributes + * + * @param pathRead determines the filename of the file that will be read + * @return menueList, userList, orderList depending on Data read + */ + public ArrayList readData2(String pathRead) { + Path path = Paths.get(pathRead); + + try { + List rows = Files.readAllLines(path); + + if (pathRead == "menue.csv") { + ArrayList menueList = new ArrayList<>(); + + for (String row : rows) { + String[] parts = row.split(":"); + + String day = parts[0]; + String date = parts[1]; + String meat = parts[2]; + String vegi = parts[3]; + String vegan = parts[4]; + String desert1 = parts[5]; + String desert2 = parts[6]; + menueList.add(day + "," + date + "," + meat + "," + vegi + "," + vegan + "," + desert1 + "," + desert2); + } + return menueList; + + } else if (pathRead == "users.csv") { + ArrayList userList = new ArrayList<>(); + + for (String row : rows) { + String[] parts = row.split(":"); + + String nameParent1 = parts[0]; + String nameParent2 = parts[1]; + String billAddress = parts[2]; + String phonenumber = parts[3]; + String nameChildren = parts[4]; + } + return userList; + + } else if (pathRead == "orders.csv") { + ArrayList orderList = new ArrayList<>(); + + for (String row : rows) { + String[] parts = row.split(":"); + + String date = parts[0]; + String meat = parts[1]; + String meatCount = parts[2]; + String vegi = parts[3]; + String vegiCount = parts[4]; + String vegan = parts[5]; + String veganCount = parts[6]; + String desert1 = parts[7]; + String desert1Count = parts[8]; + String desert2 = parts[9]; + String desert2Count = parts[10]; + } + return orderList; + + } + } catch (IOException e) { + e.printStackTrace(); + } + return null; + } + + + /** + * The method writeData writes the data of a List into a txt file. + * @param pathWrite determines the filename of the file that will be written + * @param listToWrite determines which ArrayList is to be used for writing the file + */ + public void writeData2 (String pathWrite, ArrayList listToWrite){ + if (pathWrite == "users.txt") { + + } else if (pathWrite == "orders.txt") { + + } + } } From 73fe0148067fc23460b836aac57a039083c6ad75 Mon Sep 17 00:00:00 2001 From: Sabine Gubitz Date: Thu, 24 Nov 2022 14:24:34 +0100 Subject: [PATCH 4/4] Added Code for review - entscheidung welche GeneralMethods datei genutzt werden soll ausstehend --- src/GeneralMethods.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/GeneralMethods.java b/src/GeneralMethods.java index 9698aa1..f862f88 100644 --- a/src/GeneralMethods.java +++ b/src/GeneralMethods.java @@ -52,7 +52,6 @@ public class GeneralMethods { } } - /** * Folgender Code von Sabine, zum gegen prüfen und entscheiden */