From b8f0ebb1218c85e018af5d9a3cde33dc11a7d8f8 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Wed, 7 Dec 2022 12:02:02 +0100 Subject: [PATCH 01/40] =?UTF-8?q?code=20bereinigt,=20Methoden=20angepasst,?= =?UTF-8?q?=20java=20doc=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- out/production/VPR_SCRIPT/Execute.class | Bin 2376 -> 2375 bytes src/Data.java | 106 ++++++++++++++++++++++++ src/Datei.java | 66 --------------- src/Execute.java | 20 +++-- src/User.java | 46 ++++++++++ 5 files changed, 164 insertions(+), 74 deletions(-) create mode 100644 src/Data.java delete mode 100644 src/Datei.java diff --git a/out/production/VPR_SCRIPT/Execute.class b/out/production/VPR_SCRIPT/Execute.class index 170b740fb24565e648cc4d14b2753443e72f6ee0..9c1b1267e41b8344c0be074d8683418f53cb5b54 100644 GIT binary patch delta 16 XcmX>hbX;hHCo4y3aca><|DPNHG}i`N delta 17 YcmX>ubV6u?CmUyJacWWVM!%mN06TvM&Hw-a diff --git a/src/Data.java b/src/Data.java new file mode 100644 index 0000000..70f02d9 --- /dev/null +++ b/src/Data.java @@ -0,0 +1,106 @@ +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; + +/** + * Data is a class to edit files. + * @author Madeleine Vigier + * @version 1.1 + */ +public class Data { + private String pathRead; + + public Data(String pathRead) { + this.pathRead = pathRead; + } + + /** + * load() is a methode to split a file into lines, save lines in a arraylist + * @return Arraylist userlist + * @author Madeleine Vigier + * @version 1.1 + */ + public ArrayList readData() { + Path path = Paths.get(pathRead); + + try { + List rows = Files.readAllLines(path); +//muss noch angepasst werden + if (pathRead.equals("menue.txt")) { + 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 null;//menueList; +//ist angepasst + } else if (pathRead.equals("users.txt")){ + 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]; + String password = parts[5]; + userList.add(new User(nameParent1,nameParent2,billAddress,phonenumber,nameChildren,password)); + } + return userList; +//muss noch angepasst werden + } else if (pathRead.equals("orders.txt")) { + 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 null;//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.equals("users.txt")) { + + } else if (pathWrite.equals("orders.txt")) { + + } + } + +} diff --git a/src/Datei.java b/src/Datei.java deleted file mode 100644 index 1e85ab3..0000000 --- a/src/Datei.java +++ /dev/null @@ -1,66 +0,0 @@ -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.List; - -public class Datei { - private String dataName; - - public Datei(String dataName) { - this.dataName = dataName; - } - - public User[] laden() { - - Path pfad = Paths.get(dataName); - - - try { - List zeilen = Files.readAllLines(pfad); - User[] userListe = new User[zeilen.size()]; - - for (int i = 0; i < zeilen.size(); i++) { - - String[] teile = zeilen.get(i).split(":"); - - String nameParent1 = teile[0]; - String nameParent2 = teile[1]; - String billAddress = teile[2]; - String phonenumber = teile[3]; - String nameChildren = teile[4]; - String password = teile[5]; - - - userListe[i] = new User(nameParent1, nameParent2, billAddress, phonenumber, nameChildren, password); - - - } - - return userListe; - } catch (IOException e) { - e.printStackTrace(); - } - - return null; - } - -// public void speichern(Farbe[] farben, String dateiName) { -// -// Path pfad = Paths.get(dateiname); -// -// List zeilen = new ArrayList<>(); -// for (Farbe farbe : farben) { -// zeilen.add(farbe.formatieren()); -// -// } -// try { -// Files.write(pfad, zeilen); -// } catch (IOException e) { -// e.printStackTrace(); -// } - - -// } - -} diff --git a/src/Execute.java b/src/Execute.java index 6b10c93..41a7c48 100644 --- a/src/Execute.java +++ b/src/Execute.java @@ -6,8 +6,8 @@ import java.util.Scanner; */ public class Execute { public static void main(String[] args) { - Datei datei = new Datei("user.txt"); - User[] user = datei.laden(); + Data datei = new Data("users.txt"); + ArrayList user = datei.readData(); for (User user1 : user) { System.out.println(user1); @@ -16,20 +16,17 @@ public class Execute { System.out.println("\t\t\tANMELDUNG"); int i = 0; Scanner leser = new Scanner(System.in); + while (true) { System.out.print("Name: "); boolean error = false; String name = leser.nextLine(); - if(name.isEmpty()){ - error = true; - } + error = isError(error, name); System.out.print("Passwort: "); String password = leser.nextLine(); - if(password.isEmpty()){ - error = true; - } + error = isError(error, password); for (User user1 : user) { @@ -55,4 +52,11 @@ public class Execute { } } } + + private static boolean isError(boolean error, String name) { + if (name.isEmpty()) { + error = true; + } + return error; + } } diff --git a/src/User.java b/src/User.java index 96ec52c..b8fbdff 100644 --- a/src/User.java +++ b/src/User.java @@ -1,3 +1,8 @@ +/** + * User class creates users + * @author Madeleine Vigier + * @version 1.1 + */ public class User { private String nameParent1; private String nameParent2; @@ -6,6 +11,17 @@ public class User { private String nameChildren; private String password; + /** + * constructor + * @param nameParent1 + * @param nameParent2 + * @param billAddress + * @param phonenumber + * @param nameChildren + * @param password + * @author Madeleine Vigier + * @version 1.0 + */ public User(String nameParent1, String nameParent2, String billAddress, String phonenumber, String nameChildren, String password) { this.nameParent1 = nameParent1; this.nameParent2 = nameParent2; @@ -15,22 +31,52 @@ public class User { this.password = password; } + /** + * Methode getPhonenumber() gets the Phonenumber + * @return Phonenumber + * @author Madeleine Vigier + * @version 1.0 + */ public String getPhonenumber() { return phonenumber; } + /** + * Methode getPassword() gets the password + * @return password + * @author Madeleine Vigier + * @version 1.0 + */ public String getPassword() { return password; } + /** + * Methode getNameParent1() gets nameParent1 + * @return nameParent1 + * @author Madeleine Vigier + * @version 1.0 + */ public String getNameParent1() { return nameParent1; } + /** + * Methode getNameParent2() gets nameParent2 + * @return nameParent2 + * @author Madeleine Vigier + * @version 1.0 + */ public String getNameParent2() { return nameParent2; } + /** + * Methode toString() returns a String representation of an object + * @return a String with nameParent1, nameparent2, billAdress, phonenumber, nameChildren, password + * @author Madeleine Vigier + * @version 1.0 + */ @Override public String toString() { return "User{" + From c5c096dfa7e536ff04b91514bbffc934e9f99842 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Wed, 7 Dec 2022 12:14:54 +0100 Subject: [PATCH 02/40] writeData2 umbenannt in writeData() --- src/Data.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data.java b/src/Data.java index 70f02d9..473f14b 100644 --- a/src/Data.java +++ b/src/Data.java @@ -95,7 +95,7 @@ public class Data { * @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){ + public void writeData(String pathWrite, ArrayList listToWrite){ if (pathWrite.equals("users.txt")) { } else if (pathWrite.equals("orders.txt")) { From af41dc7cf8b59dbcd7e5b6fcba498f8b36fb0f89 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Thu, 8 Dec 2022 14:59:15 +0100 Subject: [PATCH 03/40] writeData2 umbenannt in writeData() --- out/production/VPR_SCRIPT/Datei.class | Bin 0 -> 1685 bytes out/production/VPR_SCRIPT/User.class | Bin 0 -> 1752 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 out/production/VPR_SCRIPT/Datei.class create mode 100644 out/production/VPR_SCRIPT/User.class diff --git a/out/production/VPR_SCRIPT/Datei.class b/out/production/VPR_SCRIPT/Datei.class new file mode 100644 index 0000000000000000000000000000000000000000..cb428c97ba8bf6daf6baae0c2a71e7769040a8f3 GIT binary patch literal 1685 zcmb_c+in|G6kW%j@v+B~G&d&)CIA09ZoJKn!sS&4iAG zz{m~zrk(d}e=oned&8**0*NKpcY|etcs5r{A&HcPVImDvK)-AUjw_IC*nz!aA2pA%?JJ|2A=AOeAO4)wUPy0=| z$kc;TGBAlLi5E;*c(Jd{8f&qP*>>#4isw~aU#aK1^?H%I@P~oxs*zq0Xb#Bf=kEWqD?a*!3^B+jgBSWd^jFtC6(TW`ph%YBU>%2fI#t+urqP8LKqwwpX*;uF|_k zE!cNCKv@YFvqa`RyW#i(sVsR?{3{!GRw0ZJU``Y}uX8SIu^Vv*ZmCW!|LQsxEya5!=VB!k$ux>`iSI z`;y0<3Tl}sxR*<2Xszou!6zbj@2Uz+_Of%U^_-!z|Eawc>EQx)@9Q$rhr-#c+pUmT ziBCv){|%Mkv5ac-uw8f5RiY9Se?f(E2a|kV0Kq?>3raD{I$r1h4QgxDmEV|q2r)PR zE9B2%%q9MZ5mz2)%uF%&O=^=-G~UA7)Rb4Dl3Nr}iZI1}T2-ZcbH6~wpJ3<_S7-ha zGV2SEF)i=}GaKJZcD0<|d=IXvradL|9!SDeOHugk-A%+f0bz+TS~?d(i*@ literal 0 HcmV?d00001 diff --git a/out/production/VPR_SCRIPT/User.class b/out/production/VPR_SCRIPT/User.class new file mode 100644 index 0000000000000000000000000000000000000000..31ad0bb62ff62e4f73a42a65058238141cef4dd0 GIT binary patch literal 1752 zcmcgt+iuf95Ivil)5K{@TUtUPz0j+B2@Q8rkRVc3q);lgln0*NWYxHJ?Z|eEDul#m z@CiJEM1<4_K7fxx%-DvQ)Zz^y?au7+oY~o#oz3?j=idOV<53O?Bo(Aoq>&LAJk(G1 zvZ-4K9t$KF7Wev)MW2G4iab<-)Js=70(nb6mfN}`EpJU=sNQw5 z<2i?*142wTpRWZ&VvTfaU-`Gxbh>mz&MF|rEW5@cDtl3sW_g)!Zi!|5MEzcErzi=_$ ze}^nybS+^2-w^hwa5cLr1qSMdCAa+4?&|v{AwzY$p__ZUWAHizQ(nuUOl9g^?y5ll zf%LY!RS_6jh&@-H?ZRRNtgYxpVK-f%LY4FE;KB&xcI*?UAvX*Ts*m?wxo zuIK3O=hAE0O?M!Jn>nnZqTm)6`?kPL_W~N$seL5Nf!m<|8+yaDoil+C(X@w#fzwUh zYMRoWsoVC^NxOQnW)b8M;_g{n#+bj3*av-8jV3H~QPWLx$M9q|i@O3XKJ?p2XFZx1 z^UIT6pb`L)wh4epzjP_T8YMIdi^8jS)Jo4ROFA`^Q0XdoATWC&gK>#bK$oHPcT>JL zeikuBJ({4F%+O4)2Wbg@5qwE6fG?@zeMueeOKND683=lwCTX6c)koqfBV-_JD7)3iU(hZJ%&=h08ThfzS0v0%n-uAIX_zAYaB11VUFJ{Bz=uzPWc)~o%S`3o1>n?d>D0^B>PBfUoiZMlmrD7 z91Ro(Z>$Ce;l=_BvE*Vec`TN^7)w@q$>XtPEtXv9B~QeXmwuBs{Tu)#I Date: Tue, 13 Dec 2022 11:54:23 +0100 Subject: [PATCH 04/40] Comment Update --- src/GeneralMethods.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GeneralMethods.java b/src/GeneralMethods.java index cfa8924..603906a 100644 --- a/src/GeneralMethods.java +++ b/src/GeneralMethods.java @@ -108,7 +108,7 @@ public class GeneralMethods { /** - * The method writeData writes the data of a List into a txt file. + * The method writeData2 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 */ From 87b8a566f1b043ce411f53530b9c45b15f48cee6 Mon Sep 17 00:00:00 2001 From: Sabine Gubitz Date: Wed, 14 Dec 2022 13:17:46 +0100 Subject: [PATCH 05/40] Code abgenommen --- src/Data.java | 136 +++++++++++++++++++++++++++++++++++++++++------ src/Execute.java | 2 +- src/User.java | 2 +- 3 files changed, 121 insertions(+), 19 deletions(-) diff --git a/src/Data.java b/src/Data.java index 473f14b..74d65a1 100644 --- a/src/Data.java +++ b/src/Data.java @@ -18,9 +18,9 @@ public class Data { } /** - * load() is a methode to split a file into lines, save lines in a arraylist + * readData() is a method to split a file into lines and save them in an arraylist * @return Arraylist userlist - * @author Madeleine Vigier + * @author Madeleine Vigier, Sabine Gubitz * @version 1.1 */ public ArrayList readData() { @@ -28,24 +28,124 @@ public class Data { try { List rows = Files.readAllLines(path); -//muss noch angepasst werden - if (pathRead.equals("menue.txt")) { +//Object class Meal is still missing and needs to be added + if (pathRead.equals("menue.csv")) { ArrayList menueList = new ArrayList<>(); + //Booleans for allergens + boolean eggs = false, peanuts = false, fish = false, grains = false, crustaceans = false, + lupines = false, milk = false, nuts = false, sulfurDioxideAndSulfite = false, celeriac = false, + mustards = false, sesame = false, soy = false, molluscs = false; + + //Booleans for additives + boolean antioxidant = false, artificialColours = false, flavourEnhancer = false, preservatives = false, + nitrate = false, picklingSalt = false, phosphate = false, artificialSweetener = false; + 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); + String dish = parts[2]; + String sideDish = parts[3]; + String typ = parts[4]; + String desertV = parts[5]; + String desert = parts[6]; + String allergens = parts[7]; + if ( allergens != "") { + eggs = true; + } + allergens = parts[8]; + if ( allergens != "") { + peanuts = true; + } + allergens = parts[9]; + if ( allergens != "") { + fish = true; + } + allergens = parts[10]; + if ( allergens != "") { + grains = true; + } + allergens = parts[11]; + if ( allergens != "") { + crustaceans = true; + } + allergens = parts[12]; + if ( allergens != "") { + lupines = true; + } + allergens = parts[13]; + if ( allergens != "") { + milk = true; + } + allergens = parts[14]; + if ( allergens != "") { + nuts = true; + } + allergens = parts[15]; + if ( allergens != "") { + sulfurDioxideAndSulfite = true; + } + allergens = parts[16]; + if ( allergens != "") { + celeriac = true; + } + allergens = parts[17]; + if ( allergens != "") { + mustards = true; + } + allergens = parts[18]; + if ( allergens != "") { + sesame = true; + } + allergens = parts[19]; + if ( allergens != "") { + soy = true; + } + allergens = parts[20]; + if ( allergens != "") { + molluscs = true; + } + String additives = parts[21]; + if ( additives != "") { + antioxidant = true; + } + additives = parts[22]; + if ( additives != "") { + artificialColours = true; + } + additives = parts[23]; + if ( additives != "") { + flavourEnhancer = true; + } + additives = parts[24]; + if ( additives != "") { + preservatives = true; + } + additives = parts[25]; + if ( additives != "") { + nitrate = true; + } + additives = parts[26]; + if ( additives != "") { + picklingSalt = true; + } + additives = parts[27]; + if ( additives != "") { + phosphate = true; + } + additives = parts[28]; + if ( additives != "") { + artificialSweetener = true; + } + + //menueList.add(new Meal(date, dish, sideDish, typ, desertV, desert, eggs, peanuts, fish, grains, + // crustaceans, lupines, milk, nuts, sulfurDioxideAndSulfite, celeriac, mustards, sesame, + // soy, molluscs, antioxidant, artificialColours, flavourEnhancer, preservatives, nitrate, + // picklingSalt, phosphate, artificialSweetener)); } return null;//menueList; -//ist angepasst + } else if (pathRead.equals("users.txt")){ ArrayList userList = new ArrayList<>(); @@ -61,7 +161,7 @@ public class Data { userList.add(new User(nameParent1,nameParent2,billAddress,phonenumber,nameChildren,password)); } return userList; -//muss noch angepasst werden +//Object class Order is still missing and needs to be added } else if (pathRead.equals("orders.txt")) { ArrayList orderList = new ArrayList<>(); @@ -75,10 +175,12 @@ public class Data { 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]; + String desertV = parts[7]; + String desertVCount = parts[8]; + String desert = parts[9]; + String desertCount = parts[10]; + //orderList.add(new Order(date, meat, meatCount,vegi, vegiCount, vegan, veganCount, desertV, + // desertVCount, desert, desertCount)) } return null;//orderList diff --git a/src/Execute.java b/src/Execute.java index 41a7c48..e660d5c 100644 --- a/src/Execute.java +++ b/src/Execute.java @@ -2,7 +2,7 @@ import java.util.ArrayList; import java.util.Scanner; /** - * The class Execute is the executen file for the whole programm. + * The class Execute is the execution file for the whole program. */ public class Execute { public static void main(String[] args) { diff --git a/src/User.java b/src/User.java index b8fbdff..1c2894f 100644 --- a/src/User.java +++ b/src/User.java @@ -1,5 +1,5 @@ /** - * User class creates users + * User class creates User Objects * @author Madeleine Vigier * @version 1.1 */ From 7914c07924e636bb95169671d3f8f06aaf35db64 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Wed, 14 Dec 2022 20:34:17 +0100 Subject: [PATCH 06/40] user.txt angepasst --- user.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user.txt b/user.txt index 618fa76..070c533 100644 --- a/user.txt +++ b/user.txt @@ -1,2 +1,2 @@ -Felix Düsterhaus:Sabine Gubitz:Detmolderstrasse 101,33102 Paderborn:1234567:Lisa,Peter:12345 -Kevin Pfannenstiel:Marlene Pfannenstiel:Fürstenallee 30, 33102 Paderborn:7654321:Anton:12345 +Felix Düsterhaus;Sabine Gubitz;Detmolderstrasse 101,33102 Paderborn;1234567;Lisa,Peter;12345 +Kevin Pfannenstiel;Marlene Pfannenstiel;Fürstenallee 30, 33102 Paderborn;7654321;Anton;12345 From 81f1cac65762cc650cfc245f4c8ffb46d76df0d1 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Wed, 14 Dec 2022 20:34:53 +0100 Subject: [PATCH 07/40] Klasse Order angelegt --- src/Order.java | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/Order.java diff --git a/src/Order.java b/src/Order.java new file mode 100644 index 0000000..a4d1920 --- /dev/null +++ b/src/Order.java @@ -0,0 +1,2 @@ +public class Order { +} From 6e583b939f929528d8082f2a8ba1c65c0a3402bd Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Wed, 14 Dec 2022 20:38:33 +0100 Subject: [PATCH 08/40] Methoden angelegt/angepasst --- src/Data.java | 336 ++++++++++++++++++++++++++++---------------------- 1 file changed, 187 insertions(+), 149 deletions(-) diff --git a/src/Data.java b/src/Data.java index 74d65a1..aad4509 100644 --- a/src/Data.java +++ b/src/Data.java @@ -8,7 +8,7 @@ import java.util.List; /** * Data is a class to edit files. * @author Madeleine Vigier - * @version 1.1 + * @version 1.3 */ public class Data { private String pathRead; @@ -16,157 +16,184 @@ public class Data { public Data(String pathRead) { this.pathRead = pathRead; } + /** + * readUser() is a method to split user.txt into lines and save them in an arraylist + * @return Arraylist userList + * @author Madeleine Vigier, Sabine Gubitz + * @version 1.3 + */ + public ArrayList readUser(){ + List rows = getRows(); + 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]; + String password = parts[5]; + userList.add(new User(nameParent1,nameParent2,billAddress,phonenumber,nameChildren,password)); + } + return userList; + + } + /** - * readData() is a method to split a file into lines and save them in an arraylist - * @return Arraylist userlist + * readMenue() is a method to split menue.txt into lines and save them in an arraylist + * @return Arraylist menuelist * @author Madeleine Vigier, Sabine Gubitz - * @version 1.1 + * @version 1.3 */ - public ArrayList readData() { - Path path = Paths.get(pathRead); + public ArrayList readMenue(){ + ArrayList menueList = new ArrayList<>(); + List rows = getRows(); - try { - List rows = Files.readAllLines(path); -//Object class Meal is still missing and needs to be added - if (pathRead.equals("menue.csv")) { - ArrayList menueList = new ArrayList<>(); + for (String row : rows) { + String[] parts = row.split(";"); - //Booleans for allergens - boolean eggs = false, peanuts = false, fish = false, grains = false, crustaceans = false, - lupines = false, milk = false, nuts = false, sulfurDioxideAndSulfite = false, celeriac = false, - mustards = false, sesame = false, soy = false, molluscs = false; + String date = parts[1]; + String dish = parts[2]; + String sideDish = parts[3]; + String typ = parts[4]; + String desertV = parts[5]; + String desert = parts[6]; + String allergens = parts[7]; - //Booleans for additives - boolean antioxidant = false, artificialColours = false, flavourEnhancer = false, preservatives = false, - nitrate = false, picklingSalt = false, phosphate = false, artificialSweetener = false; + + boolean eggs = false; + if (allergens != "") { + eggs = true; + } + allergens = parts[8]; + boolean peanuts = false; + if (allergens != "") { + peanuts = true; + } + allergens = parts[9]; + boolean fish = false; + if (allergens != "") { + fish = true; + } + allergens = parts[10]; + boolean grains = false; + if (allergens != "") { + grains = true; + } + allergens = parts[11]; + boolean crustaceans = false; + if (allergens != "") { + crustaceans = true; + } + allergens = parts[12]; + boolean lupines = false; + if (allergens != "") { + lupines = true; + } + allergens = parts[13]; + boolean milk = false; + if (allergens != "") { + milk = true; + } + allergens = parts[14]; + boolean nuts = false; + if (allergens != "") { + nuts = true; + } + allergens = parts[15]; + boolean sulfurDioxideAndSulfite = false; + if (allergens != "") { + sulfurDioxideAndSulfite = true; + } + allergens = parts[16]; + boolean celeriac = false; + if (allergens != "") { + celeriac = true; + } + allergens = parts[17]; + boolean mustards = false; + if (allergens != "") { + mustards = true; + } + allergens = parts[18]; + boolean sesame = false; + if (allergens != "") { + sesame = true; + } + allergens = parts[19]; + boolean soy = false; + if (allergens != "") { + soy = true; + } + allergens = parts[20]; + boolean molluscs = false; + if (allergens != "") { + molluscs = true; + } + String additives = parts[21]; + boolean antioxidant = false; + if (additives != "") { + antioxidant = true; + } + additives = parts[22]; + boolean artificialColours = false; + if (additives != "") { + artificialColours = true; + } + additives = parts[23]; + boolean flavourEnhancer = false; + if (additives != "") { + flavourEnhancer = true; + } + additives = parts[24]; + boolean preservatives = false; + if (additives != "") { + preservatives = true; + } + additives = parts[25]; + boolean nitrate = false; + if (additives != "") { + nitrate = true; + } + additives = parts[26]; + boolean picklingSalt = false; + if (additives != "") { + picklingSalt = true; + } + additives = parts[27]; + boolean phosphate = false; + if (additives != "") { + phosphate = true; + } + additives = parts[28]; + boolean artificialSweetener = false; + if (additives != "") { + artificialSweetener = true; + } + + menueList.add(new Menue(date, dish, sideDish, typ, desertV, desert, eggs, peanuts, fish, grains, + crustaceans, lupines, milk, nuts, sulfurDioxideAndSulfite, celeriac, mustards, sesame, + soy, molluscs, antioxidant, artificialColours, flavourEnhancer, preservatives, nitrate, + picklingSalt, phosphate, artificialSweetener)); + } + return menueList; + } + /** + * readOrder() is a method to split a order.txt into lines and save them in an arraylist + * @return Arraylist orderlist + * @author Madeleine Vigier, Sabine Gubitz + * @version 1.2 + */ + public ArrayList readOrder(){ + + ArrayList orderList = new ArrayList<>(); + List rows = getRows(); for (String row : rows) { - String[] parts = row.split(":"); - - String date = parts[1]; - String dish = parts[2]; - String sideDish = parts[3]; - String typ = parts[4]; - String desertV = parts[5]; - String desert = parts[6]; - String allergens = parts[7]; - if ( allergens != "") { - eggs = true; - } - allergens = parts[8]; - if ( allergens != "") { - peanuts = true; - } - allergens = parts[9]; - if ( allergens != "") { - fish = true; - } - allergens = parts[10]; - if ( allergens != "") { - grains = true; - } - allergens = parts[11]; - if ( allergens != "") { - crustaceans = true; - } - allergens = parts[12]; - if ( allergens != "") { - lupines = true; - } - allergens = parts[13]; - if ( allergens != "") { - milk = true; - } - allergens = parts[14]; - if ( allergens != "") { - nuts = true; - } - allergens = parts[15]; - if ( allergens != "") { - sulfurDioxideAndSulfite = true; - } - allergens = parts[16]; - if ( allergens != "") { - celeriac = true; - } - allergens = parts[17]; - if ( allergens != "") { - mustards = true; - } - allergens = parts[18]; - if ( allergens != "") { - sesame = true; - } - allergens = parts[19]; - if ( allergens != "") { - soy = true; - } - allergens = parts[20]; - if ( allergens != "") { - molluscs = true; - } - String additives = parts[21]; - if ( additives != "") { - antioxidant = true; - } - additives = parts[22]; - if ( additives != "") { - artificialColours = true; - } - additives = parts[23]; - if ( additives != "") { - flavourEnhancer = true; - } - additives = parts[24]; - if ( additives != "") { - preservatives = true; - } - additives = parts[25]; - if ( additives != "") { - nitrate = true; - } - additives = parts[26]; - if ( additives != "") { - picklingSalt = true; - } - additives = parts[27]; - if ( additives != "") { - phosphate = true; - } - additives = parts[28]; - if ( additives != "") { - artificialSweetener = true; - } - - //menueList.add(new Meal(date, dish, sideDish, typ, desertV, desert, eggs, peanuts, fish, grains, - // crustaceans, lupines, milk, nuts, sulfurDioxideAndSulfite, celeriac, mustards, sesame, - // soy, molluscs, antioxidant, artificialColours, flavourEnhancer, preservatives, nitrate, - // picklingSalt, phosphate, artificialSweetener)); - } - return null;//menueList; - - } else if (pathRead.equals("users.txt")){ - 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]; - String password = parts[5]; - userList.add(new User(nameParent1,nameParent2,billAddress,phonenumber,nameChildren,password)); - } - return userList; -//Object class Order is still missing and needs to be added - } else if (pathRead.equals("orders.txt")) { - ArrayList orderList = new ArrayList<>(); - - for (String row : rows) { - String[] parts = row.split(":"); + String[] parts = row.split(";"); String date = parts[0]; String meat = parts[1]; @@ -184,14 +211,8 @@ public class Data { } return null;//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 @@ -205,4 +226,21 @@ public class Data { } } + /** + * The method gets the rows by reading all lines of the path + * @return ArrayList rows + * @author Madeleine Vigier + * @version 1.0 + */ + private List getRows() { + Path path = Paths.get(pathRead); + List rows = new ArrayList<>(); + try { + rows = Files.readAllLines(path); + } catch (IOException e) { + e.printStackTrace(); + } + return rows; + } } + From 59c99f0a626a16ff7d607286c823a4d54a20f8ea Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Wed, 14 Dec 2022 20:44:49 +0100 Subject: [PATCH 09/40] Methoden angelegt/angepasst --- out/production/VPR_SCRIPT/User.class | Bin 1752 -> 1752 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/out/production/VPR_SCRIPT/User.class b/out/production/VPR_SCRIPT/User.class index 31ad0bb62ff62e4f73a42a65058238141cef4dd0..59687080a53d314799d10243f4c8c42570f8ffeb 100644 GIT binary patch delta 83 zcmcb?dxLkwZx&fe1{MY>22KWP20jKE24MzS21y1v26-ScFiU|=olzdlie+ Date: Wed, 14 Dec 2022 20:50:57 +0100 Subject: [PATCH 10/40] Methoden angelegt/angepasst --- src/Data.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Data.java b/src/Data.java index aad4509..2add68f 100644 --- a/src/Data.java +++ b/src/Data.java @@ -181,8 +181,10 @@ public class Data { } return menueList; } + + /** - * readOrder() is a method to split a order.txt into lines and save them in an arraylist + * readOrder() is a method to split order.txt into lines and save them in an arraylist * @return Arraylist orderlist * @author Madeleine Vigier, Sabine Gubitz * @version 1.2 From e166254bff05b915e350f80623cafc7e6f99a5ba Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Wed, 14 Dec 2022 20:53:16 +0100 Subject: [PATCH 11/40] Klasse Menue erstellt (in bearbertung) --- src/Execute.java | 2 +- src/Menue.java | 208 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 209 insertions(+), 1 deletion(-) create mode 100644 src/Menue.java diff --git a/src/Execute.java b/src/Execute.java index e660d5c..3b7a44d 100644 --- a/src/Execute.java +++ b/src/Execute.java @@ -7,7 +7,7 @@ import java.util.Scanner; public class Execute { public static void main(String[] args) { Data datei = new Data("users.txt"); - ArrayList user = datei.readData(); + ArrayList user = datei.readUser(); for (User user1 : user) { System.out.println(user1); diff --git a/src/Menue.java b/src/Menue.java new file mode 100644 index 0000000..9019497 --- /dev/null +++ b/src/Menue.java @@ -0,0 +1,208 @@ +public class Menue { + String date; + String dish; + String sideDish; + String typ; + String desertV; + String desert; + boolean eggs; + boolean peanuts; + boolean fish; + boolean grains; + boolean crustaceans; + boolean lupines; + boolean milk; + boolean nuts; + boolean sulfurDioxideAndSulfite; + boolean celeriac; + boolean mustards; + boolean sesame; + boolean soy; + boolean molluscs; + boolean antioxidant; + boolean artificialColours; + boolean flavourEnhancer; + boolean preservatives; + boolean nitrate; + boolean picklingSalt; + boolean phosphate; + boolean artificialSweetener; + + public Menue(String date, String dish, String sideDish, String typ, String desertV, String desert, boolean eggs, boolean peanuts, boolean fish, boolean grains, boolean crustaceans, boolean lupines, boolean milk, boolean nuts, boolean sulfurDioxideAndSulfite, boolean celeriac, boolean mustards, boolean sesame, boolean soy, boolean molluscs, boolean antioxidant, boolean artificialColours, boolean flavourEnhancer, boolean preservatives, boolean nitrate, boolean picklingSalt, boolean phosphate, boolean artificialSweetener) { + this.date = date; + this.dish = dish; + this.sideDish = sideDish; + this.typ = typ; + this.desertV = desertV; + this.desert = desert; + this.eggs = eggs; + this.peanuts = peanuts; + this.fish = fish; + this.grains = grains; + this.crustaceans = crustaceans; + this.lupines = lupines; + this.milk = milk; + this.nuts = nuts; + this.sulfurDioxideAndSulfite = sulfurDioxideAndSulfite; + this.celeriac = celeriac; + this.mustards = mustards; + this.sesame = sesame; + this.soy = soy; + this.molluscs = molluscs; + this.antioxidant = antioxidant; + this.artificialColours = artificialColours; + this.flavourEnhancer = flavourEnhancer; + this.preservatives = preservatives; + this.nitrate = nitrate; + this.picklingSalt = picklingSalt; + this.phosphate = phosphate; + this.artificialSweetener = artificialSweetener; + } + + public String getDate() { + return date; + } + + public String getDish() { + return dish; + } + + public String getSideDish() { + return sideDish; + } + + public String getTyp() { + return typ; + } + + public String getDesertV() { + return desertV; + } + + public String getDesert() { + return desert; + } + + public boolean isEggs() { + return eggs; + } + + public boolean isPeanuts() { + return peanuts; + } + + public boolean isFish() { + return fish; + } + + public boolean isGrains() { + return grains; + } + + public boolean isCrustaceans() { + return crustaceans; + } + + public boolean isLupines() { + return lupines; + } + + public boolean isMilk() { + return milk; + } + + public boolean isNuts() { + return nuts; + } + + public boolean isSulfurDioxideAndSulfite() { + return sulfurDioxideAndSulfite; + } + + public boolean isCeleriac() { + return celeriac; + } + + public boolean isMustards() { + return mustards; + } + + public boolean isSesame() { + return sesame; + } + + public boolean isSoy() { + return soy; + } + + public boolean isMolluscs() { + return molluscs; + } + + public boolean isAntioxidant() { + return antioxidant; + } + + public boolean isArtificialColours() { + return artificialColours; + } + + public boolean isFlavourEnhancer() { + return flavourEnhancer; + } + + public boolean isPreservatives() { + return preservatives; + } + + public boolean isNitrate() { + return nitrate; + } + + public boolean isPicklingSalt() { + return picklingSalt; + } + + public boolean isPhosphate() { + return phosphate; + } + + public boolean isArtificialSweetener() { + return artificialSweetener; + } + + @Override + public String toString() { + return "\t\t\t\tMENÜPLAN\n" + + "Montag\n" + date + "\t" + + ", dish='" + dish + '\'' + + ", sideDish='" + sideDish + '\'' + + ", typ='" + typ + '\'' + + ", desertV='" + desertV + '\'' + + ", desert='" + desert + '\'' + + ", eggs=" + eggs + + ", peanuts=" + peanuts + + ", fish=" + fish + + ", grains=" + grains + + ", crustaceans=" + crustaceans + + ", lupines=" + lupines + + ", milk=" + milk + + ", nuts=" + nuts + + ", sulfurDioxideAndSulfite=" + sulfurDioxideAndSulfite + + ", celeriac=" + celeriac + + ", mustards=" + mustards + + ", sesame=" + sesame + + ", soy=" + soy + + ", molluscs=" + molluscs + + ", antioxidant=" + antioxidant + + ", artificialColours=" + artificialColours + + ", flavourEnhancer=" + flavourEnhancer + + ", preservatives=" + preservatives + + ", nitrate=" + nitrate + + ", picklingSalt=" + picklingSalt + + ", phosphate=" + phosphate + + ", artificialSweetener=" + artificialSweetener + + '}'; + } +} + From 7d042af6d2b3f8957923bdc609411bd9ee3efb41 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Thu, 15 Dec 2022 18:49:08 +0100 Subject: [PATCH 12/40] menue.txt erstellt --- menue.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 menue.txt diff --git a/menue.txt b/menue.txt new file mode 100644 index 0000000..16567c1 --- /dev/null +++ b/menue.txt @@ -0,0 +1,14 @@ +12.12.2022;Veganes Schnitzel;mit Kroketten, Gemüse und Soße;Vegan +12.12.2022;Waffel;mit Puderzucker;Dessert V +12.12.2022;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch +12.12.2022;Wackelpudding;mit Vanillesoße;Dessert +13.12.2022;Rote Linsen Curry;mit Süßkartoffeln;Vegan +13.12.2022;Vegane Pancakes;mit Ahornsirup;Dessert V +13.12.2022;Gebratene Nudeln;mit Gemüse;Vegetarisch +13.12.2022;Berliner;;Dessert +14.12.2022;Bratkartoffeln;mit veganer Bratensoße;Vegan +14.12.2022;Pudding;;Dessert V +14.12.2022;Bratkartoffeln;mit Leberkäse und Ei;Fleisch +14.12.2022;Pudding;mit Vanillesoße;Dessert +15.12.2022;Bauerntopf;mit veganem Hack;Vegan +15.12.2022;Bananenbrot;mit Datteln;DessertV \ No newline at end of file From dca8114442f56be56a43a4ef83032b704f29eb7c Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Thu, 15 Dec 2022 19:18:07 +0100 Subject: [PATCH 13/40] menue.txt angepasst --- menue.txt | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/menue.txt b/menue.txt index 16567c1..dff8dd5 100644 --- a/menue.txt +++ b/menue.txt @@ -1,14 +1,14 @@ -12.12.2022;Veganes Schnitzel;mit Kroketten, Gemüse und Soße;Vegan -12.12.2022;Waffel;mit Puderzucker;Dessert V -12.12.2022;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch -12.12.2022;Wackelpudding;mit Vanillesoße;Dessert -13.12.2022;Rote Linsen Curry;mit Süßkartoffeln;Vegan -13.12.2022;Vegane Pancakes;mit Ahornsirup;Dessert V -13.12.2022;Gebratene Nudeln;mit Gemüse;Vegetarisch -13.12.2022;Berliner;;Dessert -14.12.2022;Bratkartoffeln;mit veganer Bratensoße;Vegan -14.12.2022;Pudding;;Dessert V -14.12.2022;Bratkartoffeln;mit Leberkäse und Ei;Fleisch -14.12.2022;Pudding;mit Vanillesoße;Dessert -15.12.2022;Bauerntopf;mit veganem Hack;Vegan -15.12.2022;Bananenbrot;mit Datteln;DessertV \ No newline at end of file +12.12.2022;Veganes Schnitzel;mit Kroketten, Gemüse und Soße;Vegan;;;;;;;;;;;;;;;;;;;;; +12.12.2022;Waffel;mit Puderzucker;Dessert V;;;;;;;;;;;;;;;;;;;;; +12.12.2022;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch;;;;;;;;;;;;;;;;;;;;; +12.12.2022;Wackelpudding;mit Vanillesoße;Dessert;;;;;;;;;;;;;;;;;;;;; +13.12.2022;Rote Linsen Curry;mit Süßkartoffeln;Vegan;;;;;;;;;;;;;;;;;;;;; +13.12.2022;Vegane Pancakes;mit Ahornsirup;Dessert V;;;;;;;;;;;;;;;;;;;;; +13.12.2022;Gebratene Nudeln;mit Gemüse;Vegetarisch;;;;;;;;;;;;;;;;;;;;; +13.12.2022;Berliner;;Dessert;;;;;;;;;;;;;;;;;;;;; +14.12.2022;Bratkartoffeln;mit veganer Bratensoße;Vegan;;;;;;;;;;;;;;;;;;;;; +14.12.2022;Pudding;;Dessert V;;;;;;;;;;;;;;;;;;;;; +14.12.2022;Bratkartoffeln;mit Leberkäse und Ei;Fleisch;;;;;;;;;;;;;;;;;;;;; +14.12.2022;Pudding;mit Vanillesoße;Dessert;;;;;;;;;;;;;;;;;;;;; +15.12.2022;Bauerntopf;mit veganem Hack;Vegan;;;;;;;;;;;;;;;;;;;;; +15.12.2022;Bananenbrot;mit Datteln;DessertV;;;;;;;;;;;;;;;;;;;;; \ No newline at end of file From 4a146547e7f4d4815d0e4e270d67115e01d7ee8a Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Thu, 15 Dec 2022 19:36:55 +0100 Subject: [PATCH 14/40] menue.txt angepasst --- menue.txt | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/menue.txt b/menue.txt index dff8dd5..f813ec1 100644 --- a/menue.txt +++ b/menue.txt @@ -1,14 +1,14 @@ -12.12.2022;Veganes Schnitzel;mit Kroketten, Gemüse und Soße;Vegan;;;;;;;;;;;;;;;;;;;;; -12.12.2022;Waffel;mit Puderzucker;Dessert V;;;;;;;;;;;;;;;;;;;;; -12.12.2022;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch;;;;;;;;;;;;;;;;;;;;; -12.12.2022;Wackelpudding;mit Vanillesoße;Dessert;;;;;;;;;;;;;;;;;;;;; -13.12.2022;Rote Linsen Curry;mit Süßkartoffeln;Vegan;;;;;;;;;;;;;;;;;;;;; -13.12.2022;Vegane Pancakes;mit Ahornsirup;Dessert V;;;;;;;;;;;;;;;;;;;;; -13.12.2022;Gebratene Nudeln;mit Gemüse;Vegetarisch;;;;;;;;;;;;;;;;;;;;; -13.12.2022;Berliner;;Dessert;;;;;;;;;;;;;;;;;;;;; -14.12.2022;Bratkartoffeln;mit veganer Bratensoße;Vegan;;;;;;;;;;;;;;;;;;;;; -14.12.2022;Pudding;;Dessert V;;;;;;;;;;;;;;;;;;;;; -14.12.2022;Bratkartoffeln;mit Leberkäse und Ei;Fleisch;;;;;;;;;;;;;;;;;;;;; -14.12.2022;Pudding;mit Vanillesoße;Dessert;;;;;;;;;;;;;;;;;;;;; -15.12.2022;Bauerntopf;mit veganem Hack;Vegan;;;;;;;;;;;;;;;;;;;;; -15.12.2022;Bananenbrot;mit Datteln;DessertV;;;;;;;;;;;;;;;;;;;;; \ No newline at end of file +12.12.2022;Veganes Schnitzel;mit Kroketten, Gemüse und Soße;Vegan;;x;;;x;;;;;;x;;;;;;;;;;; +12.12.2022;Waffel;mit Puderzucker;Dessert V;;;;;x;;;;;;;;x;;;;;;x;;; +12.12.2022;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch;;;;;x;;;;;x;;;;x;;;;;;;; +12.12.2022;Wackelpudding;mit Vanillesoße;Dessert;;;;;;;;;;;;;;;x;;;;;;; +13.12.2022;Rote Linsen Curry;mit Süßkartoffeln;Vegan;;x;;x;;;;;x;;;x;;;;;;;;;; +13.12.2022;Vegane Pancakes;mit Ahornsirup;Dessert V;;x;;x;;;;;x;;;x;;;x;;;;;;; +13.12.2022;Gebratene Nudeln;mit Gemüse;Vegetarisch;;;;;;;;;x;;;;x;;;x;;x;;;; +13.12.2022;Berliner;;Dessert;;;;;;;;;;;;;;;;;;;;;; +14.12.2022;Bratkartoffeln;mit veganer Bratensoße;Vegan;;;;;;;;;;;;;;;;;;;;;; +14.12.2022;Pudding;;Dessert V;;;;;;;;;;;;;;;;;;;;;; +14.12.2022;Bratkartoffeln;mit Leberkäse und Ei;Fleisch;;;;;;;;;;;;;;;;;;;;;; +14.12.2022;Pudding;mit Vanillesoße;Dessert;;;;;;;;;;;;;;;;;;;;;;; +15.12.2022;Bauerntopf;mit veganem Hack;Vegan;;;;;;;;;;;;;;;;;;;;;; +15.12.2022;Bananenbrot;mit Datteln;DessertV;x;;;;;;;;;;;;;;;;;;;;; \ No newline at end of file From ce62929779691d3c092bbf00bc3d9970251391f6 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Thu, 15 Dec 2022 19:37:26 +0100 Subject: [PATCH 15/40] methoden angepasst --- src/Menue.java | 123 ++++++++++++++++++++++++++++--------------------- 1 file changed, 71 insertions(+), 52 deletions(-) diff --git a/src/Menue.java b/src/Menue.java index 9019497..b19ea8d 100644 --- a/src/Menue.java +++ b/src/Menue.java @@ -1,10 +1,14 @@ +/** + * Menue is a class to built a menue + * + * @author: Madeleine Vigier + * @version: 1.0 + */ public class Menue { String date; String dish; String sideDish; String typ; - String desertV; - String desert; boolean eggs; boolean peanuts; boolean fish; @@ -28,13 +32,41 @@ public class Menue { boolean phosphate; boolean artificialSweetener; - public Menue(String date, String dish, String sideDish, String typ, String desertV, String desert, boolean eggs, boolean peanuts, boolean fish, boolean grains, boolean crustaceans, boolean lupines, boolean milk, boolean nuts, boolean sulfurDioxideAndSulfite, boolean celeriac, boolean mustards, boolean sesame, boolean soy, boolean molluscs, boolean antioxidant, boolean artificialColours, boolean flavourEnhancer, boolean preservatives, boolean nitrate, boolean picklingSalt, boolean phosphate, boolean artificialSweetener) { + /** + * constructor + * + * @param date date of meal + * @param dish meal + * @param sideDish side dish + * @param typ vegan, vegetarian or meat + * @param eggs allergens + * @param peanuts allergens + * @param fish allergens + * @param grains allergens + * @param crustaceans allergens + * @param lupines allergens + * @param milk allergens + * @param nuts allergens + * @param sulfurDioxideAndSulfite additives + * @param celeriac additives + * @param mustards additives + * @param sesame additives + * @param soy additives + * @param molluscs additives + * @param antioxidant additives + * @param artificialColours additives + * @param flavourEnhancer additives + * @param preservatives additives + * @param nitrate additives + * @param picklingSalt additives + * @param phosphate additives + * @param artificialSweetener additives + */ + public Menue(String date, String dish, String sideDish, String typ, boolean eggs, boolean peanuts, boolean fish, boolean grains, boolean crustaceans, boolean lupines, boolean milk, boolean nuts, boolean sulfurDioxideAndSulfite, boolean celeriac, boolean mustards, boolean sesame, boolean soy, boolean molluscs, boolean antioxidant, boolean artificialColours, boolean flavourEnhancer, boolean preservatives, boolean nitrate, boolean picklingSalt, boolean phosphate, boolean artificialSweetener) { this.date = date; this.dish = dish; this.sideDish = sideDish; this.typ = typ; - this.desertV = desertV; - this.desert = desert; this.eggs = eggs; this.peanuts = peanuts; this.fish = fish; @@ -59,6 +91,7 @@ public class Menue { this.artificialSweetener = artificialSweetener; } + public String getDate() { return date; } @@ -72,31 +105,45 @@ public class Menue { } public String getTyp() { - return typ; + if (typ.equals("DessertV") || typ.equals("Dessert")) { + return ""; + } else { + + return typ; + } } - public String getDesertV() { - return desertV; + public String getEggs() { + if (eggs) { + return "a"; + } else { + return ""; + } + } - public String getDesert() { - return desert; + public String getPeanuts() { + if (peanuts) { + return "d"; + } else { + return ""; + } } - public boolean isEggs() { - return eggs; + public String getFish() { + if (fish) { + return "m"; + } else { + return ""; + } } - public boolean isPeanuts() { - return peanuts; - } - - public boolean isFish() { - return fish; - } - - public boolean isGrains() { - return grains; + public String getGrains() { + if (grains) { + return "a"; + } else { + return ""; + } } public boolean isCrustaceans() { @@ -173,36 +220,8 @@ public class Menue { @Override public String toString() { - return "\t\t\t\tMENÜPLAN\n" + - "Montag\n" + date + "\t" + - ", dish='" + dish + '\'' + - ", sideDish='" + sideDish + '\'' + - ", typ='" + typ + '\'' + - ", desertV='" + desertV + '\'' + - ", desert='" + desert + '\'' + - ", eggs=" + eggs + - ", peanuts=" + peanuts + - ", fish=" + fish + - ", grains=" + grains + - ", crustaceans=" + crustaceans + - ", lupines=" + lupines + - ", milk=" + milk + - ", nuts=" + nuts + - ", sulfurDioxideAndSulfite=" + sulfurDioxideAndSulfite + - ", celeriac=" + celeriac + - ", mustards=" + mustards + - ", sesame=" + sesame + - ", soy=" + soy + - ", molluscs=" + molluscs + - ", antioxidant=" + antioxidant + - ", artificialColours=" + artificialColours + - ", flavourEnhancer=" + flavourEnhancer + - ", preservatives=" + preservatives + - ", nitrate=" + nitrate + - ", picklingSalt=" + picklingSalt + - ", phosphate=" + phosphate + - ", artificialSweetener=" + artificialSweetener + - '}'; + return "Montag\n" + "\t\t\t\t" + dish + "\n" + sideDish + + "Allergene" + "\n" + getTyp(); } } From c9206ed2da47ef221a05929f41bc63f0eef00ec7 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Thu, 15 Dec 2022 19:37:48 +0100 Subject: [PATCH 16/40] ausgabe --- out/production/VPR_SCRIPT/Execute.class | Bin 2375 -> 1263 bytes src/Execute.java | 92 +++++++++++++----------- 2 files changed, 51 insertions(+), 41 deletions(-) diff --git a/out/production/VPR_SCRIPT/Execute.class b/out/production/VPR_SCRIPT/Execute.class index 9c1b1267e41b8344c0be074d8683418f53cb5b54..784d629a174ee0122e77c0741eca8a840b3e4a8c 100644 GIT binary patch literal 1263 zcmZuw*-{fh6g^EQbP@)_8Vo9mYY0nFa3hE!i=x9~VNoSMHDL+{v(;o`kx$_ZeDOse zpwKGIXTQU*@IgI26ND&9)!gpe=bn4->D%9bef|ny3NK@5LP)|e5k|8>`>uMYGI>?p z&a7!rR!2n+MoP1`+bydxBDqc2*E_6%um`I>kpv$Lh#0W$j z&vunpas?6%Jd1UIwgpM_Nt`!v0T%^2PiT%I0&+)HmhC+@%N{p$#3d7#F~C-fzPtOF z`;;;IKbme|2lTeV!*8ORSZT%j`dEq^9acOf#}|%~QFz zOR8M&ON-;W!5nRz(Z>dhu>*kM+9;}mFVTO4E)ZKQRo$Gu;Aj!ex=y1ShymQ;d(*!V zNQh>B?{Sx*6|~{>A;d>6nsA?AeGERE2mG1=0F%ga7vz4#~e z0FL68jyeQ11Pz1`X4rIzU*Wwrck;bwW-f`WWC$O%97`T!2y}F2G(;FeC%F_>1Uf^c zQWjp1oRc~<7|KWkL#!jUVkRv;%gGORW|T&wflX*43pURQhauY0c_DR#RyA$8y^~~Dl6Aq0gF52as$rXf?byN4;=`}iVbDryhfT0+ z9IVFaI~d0eii_9$6{hIWP~AD|*FyEmQXjw3wf|2_j9 z=wzs~6vj(O$DC4S#nA)~D4Mz$w$x}MKUb@CW+Lbz+9!BX444Y|H3NN$*N`88jsy-G zcpYyL{f?NEDa#QIn>#w!v##S14r@4KU;u+_S@qLGq*&#VVoA>X>79TjkJe%HWzNHeq*`K%aroh+AAmMqYyEV(1e znZp}Y<9enxATNS*3_U3~Z#m{gQLyu(oGsWqFPt7TBfN4YTM&+!wuC9lrtln5kv$Pi zF>E_wNh!=Brzq^4$kAbOOgd3whIVQ=Po$5`iEKqu)`G)sj=Dyb!wH{?vwX&;mFAS2 z<#vX9mYUZVgR)>zMA1}jKczHS-fj}L8Y zNK2lb9p@!KSPhm2I`w+mt$0~+%2K2lwYYnfzf{gATvwK*$4lcv7TjF9F^qW~*Kl3K zr>ZVKV@RxoW;s{fSZYNu(|OFg4LwEqFvkG}WyCx`2g3K!91kyH%R-1PKL3kmOV~+mv$=#< z1IHdAasEE`KEVEgpjz!-LN8f}2bVy5)yCv)goDYD5*{UCRieeUmy)i5NIbHfj0Tc= zOpitH;buG%)B6YNW1&09#_N}GOlc3_MxUCTRz_)(c1XlUkd@Yh$E}F zZd%!T2XW=hS<+j?W;M+C!{~xe5#HGG9m0$BeST2!8i3;U8|?8p)S;u1xNAoPx~V@% zvm^BI4xtIdXr{Zg6;o&qghVp(FC4W>; z*gqkQ92E=4BM8z96ZZGW(@0ZUM}hnT{l{p07Y<-GtOhe)+wo`ZL3F6c~gYGLl!MKLwas40Yj}dx| hF#RJ!h3wVg3a(NgA@n)=eU6(n(`obtar8Cf{{jZzKfM3| diff --git a/src/Execute.java b/src/Execute.java index 3b7a44d..83577d1 100644 --- a/src/Execute.java +++ b/src/Execute.java @@ -6,52 +6,62 @@ import java.util.Scanner; */ public class Execute { public static void main(String[] args) { - Data datei = new Data("users.txt"); - ArrayList user = datei.readUser(); - for (User user1 : user) { - System.out.println(user1); - } - System.out.println(); - System.out.println("\t\t\tANMELDUNG"); - int i = 0; - Scanner leser = new Scanner(System.in); + Data data = new Data("menue.txt"); - while (true) { + ArrayList menue = data.readMenue(); - - System.out.print("Name: "); - boolean error = false; - String name = leser.nextLine(); - error = isError(error, name); - System.out.print("Passwort: "); - String password = leser.nextLine(); - error = isError(error, password); - - - for (User user1 : user) { - if (!error) { - if (user1.getPassword().equals(password) && user1.getPhonenumber().equals(name)) { - System.out.println(); - System.out.println("Herzlich Willkommen " + user1.getNameParent1() + " und " + user1.getNameParent2() + ", Ihr Login war erfolgreich!"); - i++; - break; - - } else if (!(user1.getPassword().equals(password) && user1.getPhonenumber().equals(name))) { - System.out.println("Login fehlgeschlagen. Versuchen Sie es erneut."); - break; - } - - }else{ - System.out.println("Bitte Anmeldedaten angeben."); - break; - } - } - if (i > 0) { - break; - } + for (Menue m : menue) { + System.out.println(m); } } +// Data datei = new Data("users.txt"); +// ArrayList user = datei.readUser(); +// +// for (User user1 : user) { +// System.out.println(user1); +// } +// System.out.println(); +// System.out.println("\t\t\tANMELDUNG"); +// int i = 0; +// Scanner leser = new Scanner(System.in); +// +// while (true) { +// +// +// System.out.print("Name: "); +// boolean error = false; +// String name = leser.nextLine(); +// error = isError(error, name); +// System.out.print("Passwort: "); +// String password = leser.nextLine(); +// error = isError(error, password); +// +// +// for (User user1 : user) { +// if (!error) { +// if (user1.getPassword().equals(password) && user1.getPhonenumber().equals(name)) { +// System.out.println(); +// System.out.println("Herzlich Willkommen " + user1.getNameParent1() + " und " + user1.getNameParent2() + ", Ihr Login war erfolgreich!"); +// +// i++; +// break; +// +// } else if (!(user1.getPassword().equals(password) && user1.getPhonenumber().equals(name))) { +// System.out.println("Login fehlgeschlagen. Versuchen Sie es erneut."); +// break; +// } +// +// }else{ +// System.out.println("Bitte Anmeldedaten angeben."); +// break; +// } +// } +// if (i > 0) { +// break; +// } +// } +// } private static boolean isError(boolean error, String name) { if (name.isEmpty()) { From 97686d48ca5fe9806fa7b160c812d67f50ea1bc0 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Thu, 15 Dec 2022 19:38:24 +0100 Subject: [PATCH 17/40] menue methode angepasst --- src/Data.java | 118 ++++++++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 56 deletions(-) diff --git a/src/Data.java b/src/Data.java index 2add68f..fbc45cb 100644 --- a/src/Data.java +++ b/src/Data.java @@ -7,6 +7,7 @@ import java.util.List; /** * Data is a class to edit files. + * * @author Madeleine Vigier * @version 1.3 */ @@ -16,13 +17,15 @@ public class Data { public Data(String pathRead) { this.pathRead = pathRead; } + /** * readUser() is a method to split user.txt into lines and save them in an arraylist + * * @return Arraylist userList * @author Madeleine Vigier, Sabine Gubitz * @version 1.3 */ - public ArrayList readUser(){ + public ArrayList readUser() { List rows = getRows(); ArrayList userList = new ArrayList<>(); @@ -35,149 +38,149 @@ public class Data { String phonenumber = parts[3]; String nameChildren = parts[4]; String password = parts[5]; - userList.add(new User(nameParent1,nameParent2,billAddress,phonenumber,nameChildren,password)); + userList.add(new User(nameParent1, nameParent2, billAddress, phonenumber, nameChildren, password)); } return userList; - + } /** * readMenue() is a method to split menue.txt into lines and save them in an arraylist + * * @return Arraylist menuelist * @author Madeleine Vigier, Sabine Gubitz * @version 1.3 */ - public ArrayList readMenue(){ - ArrayList menueList = new ArrayList<>(); - List rows = getRows(); + public ArrayList readMenue() { + List rows = getRows(); + ArrayList menueList = new ArrayList<>(); for (String row : rows) { String[] parts = row.split(";"); - String date = parts[1]; - String dish = parts[2]; - String sideDish = parts[3]; - String typ = parts[4]; - String desertV = parts[5]; - String desert = parts[6]; - String allergens = parts[7]; + String date = parts[0]; + String dish = parts[1]; + String sideDish = parts[2]; + String typ = parts[3]; + String allergens = parts[4]; boolean eggs = false; if (allergens != "") { eggs = true; + } - allergens = parts[8]; + allergens = parts[5]; boolean peanuts = false; if (allergens != "") { peanuts = true; } - allergens = parts[9]; + allergens = parts[6]; boolean fish = false; if (allergens != "") { fish = true; } - allergens = parts[10]; + allergens = parts[7]; boolean grains = false; if (allergens != "") { grains = true; } - allergens = parts[11]; + allergens = parts[8]; boolean crustaceans = false; if (allergens != "") { crustaceans = true; } - allergens = parts[12]; + allergens = parts[9]; boolean lupines = false; if (allergens != "") { lupines = true; } - allergens = parts[13]; + allergens = parts[10]; boolean milk = false; if (allergens != "") { milk = true; } - allergens = parts[14]; + allergens = parts[11]; boolean nuts = false; if (allergens != "") { nuts = true; } - allergens = parts[15]; + allergens = parts[12]; boolean sulfurDioxideAndSulfite = false; if (allergens != "") { sulfurDioxideAndSulfite = true; } - allergens = parts[16]; + allergens = parts[13]; boolean celeriac = false; if (allergens != "") { celeriac = true; } - allergens = parts[17]; + allergens = parts[14]; boolean mustards = false; if (allergens != "") { mustards = true; } - allergens = parts[18]; + allergens = parts[15]; boolean sesame = false; if (allergens != "") { sesame = true; } - allergens = parts[19]; + allergens = parts[16]; boolean soy = false; if (allergens != "") { soy = true; } - allergens = parts[20]; + allergens = parts[17]; boolean molluscs = false; if (allergens != "") { molluscs = true; } - String additives = parts[21]; + String additives = parts[18]; boolean antioxidant = false; if (additives != "") { antioxidant = true; } - additives = parts[22]; + additives = parts[19]; boolean artificialColours = false; if (additives != "") { artificialColours = true; } - additives = parts[23]; + additives = parts[20]; boolean flavourEnhancer = false; if (additives != "") { flavourEnhancer = true; } - additives = parts[24]; + additives = parts[21]; boolean preservatives = false; if (additives != "") { preservatives = true; } - additives = parts[25]; + additives = parts[22]; boolean nitrate = false; if (additives != "") { nitrate = true; } - additives = parts[26]; + additives = parts[23]; boolean picklingSalt = false; if (additives != "") { picklingSalt = true; } - additives = parts[27]; + additives = parts[24]; boolean phosphate = false; if (additives != "") { phosphate = true; } - additives = parts[28]; + additives = parts[25]; boolean artificialSweetener = false; if (additives != "") { artificialSweetener = true; } - menueList.add(new Menue(date, dish, sideDish, typ, desertV, desert, eggs, peanuts, fish, grains, + menueList.add(new Menue(date, dish, sideDish, typ, eggs, peanuts, fish, grains, crustaceans, lupines, milk, nuts, sulfurDioxideAndSulfite, celeriac, mustards, sesame, soy, molluscs, antioxidant, artificialColours, flavourEnhancer, preservatives, nitrate, - picklingSalt, phosphate, artificialSweetener)); + picklingSalt, artificialSweetener, phosphate)); } return menueList; } @@ -185,42 +188,44 @@ public class Data { /** * readOrder() is a method to split order.txt into lines and save them in an arraylist + * * @return Arraylist orderlist * @author Madeleine Vigier, Sabine Gubitz * @version 1.2 */ - public ArrayList readOrder(){ + public ArrayList readOrder() { ArrayList orderList = new ArrayList<>(); List rows = getRows(); - for (String row : rows) { - String[] parts = row.split(";"); + 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 desertV = parts[7]; - String desertVCount = parts[8]; - String desert = parts[9]; - String desertCount = parts[10]; - //orderList.add(new Order(date, meat, meatCount,vegi, vegiCount, vegan, veganCount, desertV, - // desertVCount, desert, desertCount)) - } - return null;//orderList + 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 desertV = parts[7]; + String desertVCount = parts[8]; + String desert = parts[9]; + String desertCount = parts[10]; + //orderList.add(new Order(date, meat, meatCount,vegi, vegiCount, vegan, veganCount, desertV, + // desertVCount, desert, desertCount)) + } + return null;//orderList } /** * 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 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 writeData(String pathWrite, ArrayList listToWrite){ + public void writeData(String pathWrite, ArrayList listToWrite) { if (pathWrite.equals("users.txt")) { } else if (pathWrite.equals("orders.txt")) { @@ -230,6 +235,7 @@ public class Data { /** * The method gets the rows by reading all lines of the path + * * @return ArrayList rows * @author Madeleine Vigier * @version 1.0 From 1bc6ecd05ed5d91b729a27e5ef0584a09cdc1207 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Thu, 15 Dec 2022 19:38:36 +0100 Subject: [PATCH 18/40] menue methode angepasst --- out/production/VPR_SCRIPT/Datei.class | Bin 1685 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 out/production/VPR_SCRIPT/Datei.class diff --git a/out/production/VPR_SCRIPT/Datei.class b/out/production/VPR_SCRIPT/Datei.class deleted file mode 100644 index cb428c97ba8bf6daf6baae0c2a71e7769040a8f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1685 zcmb_c+in|G6kW%j@v+B~G&d&)CIA09ZoJKn!sS&4iAG zz{m~zrk(d}e=oned&8**0*NKpcY|etcs5r{A&HcPVImDvK)-AUjw_IC*nz!aA2pA%?JJ|2A=AOeAO4)wUPy0=| z$kc;TGBAlLi5E;*c(Jd{8f&qP*>>#4isw~aU#aK1^?H%I@P~oxs*zq0Xb#Bf=kEWqD?a*!3^B+jgBSWd^jFtC6(TW`ph%YBU>%2fI#t+urqP8LKqwwpX*;uF|_k zE!cNCKv@YFvqa`RyW#i(sVsR?{3{!GRw0ZJU``Y}uX8SIu^Vv*ZmCW!|LQsxEya5!=VB!k$ux>`iSI z`;y0<3Tl}sxR*<2Xszou!6zbj@2Uz+_Of%U^_-!z|Eawc>EQx)@9Q$rhr-#c+pUmT ziBCv){|%Mkv5ac-uw8f5RiY9Se?f(E2a|kV0Kq?>3raD{I$r1h4QgxDmEV|q2r)PR zE9B2%%q9MZ5mz2)%uF%&O=^=-G~UA7)Rb4Dl3Nr}iZI1}T2-ZcbH6~wpJ3<_S7-ha zGV2SEF)i=}GaKJZcD0<|d=IXvradL|9!SDeOHugk-A%+f0bz+TS~?d(i*@ From a38bd2b59f1f60986c03805b42c73a5753a0abdb Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Thu, 15 Dec 2022 20:03:06 +0100 Subject: [PATCH 19/40] menue methode angepasst --- src/Data.java | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/Data.java b/src/Data.java index fbc45cb..16d3d84 100644 --- a/src/Data.java +++ b/src/Data.java @@ -67,113 +67,113 @@ public class Data { boolean eggs = false; - if (allergens != "") { + if (!allergens.isEmpty()) { eggs = true; } allergens = parts[5]; boolean peanuts = false; - if (allergens != "") { + if (!allergens.isEmpty()) { peanuts = true; } allergens = parts[6]; boolean fish = false; - if (allergens != "") { + if (!allergens.isEmpty()) { fish = true; } allergens = parts[7]; boolean grains = false; - if (allergens != "") { + if (!allergens.isEmpty()) { grains = true; } allergens = parts[8]; boolean crustaceans = false; - if (allergens != "") { + if (!allergens.isEmpty()) { crustaceans = true; } allergens = parts[9]; boolean lupines = false; - if (allergens != "") { + if (!allergens.isEmpty()) { lupines = true; } allergens = parts[10]; boolean milk = false; - if (allergens != "") { + if (!allergens.isEmpty()) { milk = true; } allergens = parts[11]; boolean nuts = false; - if (allergens != "") { + if (!allergens.isEmpty()) { nuts = true; } allergens = parts[12]; boolean sulfurDioxideAndSulfite = false; - if (allergens != "") { + if (!allergens.isEmpty()) { sulfurDioxideAndSulfite = true; } allergens = parts[13]; boolean celeriac = false; - if (allergens != "") { + if (!allergens.isEmpty()) { celeriac = true; } allergens = parts[14]; boolean mustards = false; - if (allergens != "") { + if (!allergens.isEmpty()) { mustards = true; } allergens = parts[15]; boolean sesame = false; - if (allergens != "") { + if (!allergens.isEmpty()) { sesame = true; } allergens = parts[16]; boolean soy = false; - if (allergens != "") { + if (!allergens.isEmpty()) { soy = true; } allergens = parts[17]; boolean molluscs = false; - if (allergens != "") { + if (!allergens.isEmpty()) { molluscs = true; } String additives = parts[18]; boolean antioxidant = false; - if (additives != "") { + if (!additives.isEmpty()) { antioxidant = true; } additives = parts[19]; boolean artificialColours = false; - if (additives != "") { + if (!additives.isEmpty()) { artificialColours = true; } additives = parts[20]; boolean flavourEnhancer = false; - if (additives != "") { + if (!additives.isEmpty()) { flavourEnhancer = true; } additives = parts[21]; boolean preservatives = false; - if (additives != "") { + if (!additives.isEmpty()) { preservatives = true; } additives = parts[22]; boolean nitrate = false; - if (additives != "") { + if (!additives.isEmpty()) { nitrate = true; } additives = parts[23]; boolean picklingSalt = false; - if (additives != "") { + if (!additives.isEmpty()) { picklingSalt = true; } additives = parts[24]; boolean phosphate = false; - if (additives != "") { + if (!additives.isEmpty()) { phosphate = true; } additives = parts[25]; boolean artificialSweetener = false; - if (additives != "") { + if (!additives.isEmpty()) { artificialSweetener = true; } From 3d283c95cde025c4ffd05582181eb9a38557c299 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Fri, 16 Dec 2022 08:37:27 +0100 Subject: [PATCH 20/40] menue.txt (in Bearbeitung) --- menue.txt | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/menue.txt b/menue.txt index f813ec1..a7f717c 100644 --- a/menue.txt +++ b/menue.txt @@ -1,14 +1,14 @@ -12.12.2022;Veganes Schnitzel;mit Kroketten, Gemüse und Soße;Vegan;;x;;;x;;;;;;x;;;;;;;;;;; -12.12.2022;Waffel;mit Puderzucker;Dessert V;;;;;x;;;;;;;;x;;;;;;x;;; -12.12.2022;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch;;;;;x;;;;;x;;;;x;;;;;;;; -12.12.2022;Wackelpudding;mit Vanillesoße;Dessert;;;;;;;;;;;;;;;x;;;;;;; -13.12.2022;Rote Linsen Curry;mit Süßkartoffeln;Vegan;;x;;x;;;;;x;;;x;;;;;;;;;; -13.12.2022;Vegane Pancakes;mit Ahornsirup;Dessert V;;x;;x;;;;;x;;;x;;;x;;;;;;; -13.12.2022;Gebratene Nudeln;mit Gemüse;Vegetarisch;;;;;;;;;x;;;;x;;;x;;x;;;; -13.12.2022;Berliner;;Dessert;;;;;;;;;;;;;;;;;;;;;; -14.12.2022;Bratkartoffeln;mit veganer Bratensoße;Vegan;;;;;;;;;;;;;;;;;;;;;; -14.12.2022;Pudding;;Dessert V;;;;;;;;;;;;;;;;;;;;;; -14.12.2022;Bratkartoffeln;mit Leberkäse und Ei;Fleisch;;;;;;;;;;;;;;;;;;;;;; -14.12.2022;Pudding;mit Vanillesoße;Dessert;;;;;;;;;;;;;;;;;;;;;;; -15.12.2022;Bauerntopf;mit veganem Hack;Vegan;;;;;;;;;;;;;;;;;;;;;; -15.12.2022;Bananenbrot;mit Datteln;DessertV;x;;;;;;;;;;;;;;;;;;;;; \ No newline at end of file +12.12.2022;Veganes Schnitzel;mit Kroketten, Gemüse und Soße;Vegan;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +12.12.2022;Waffel;mit Puderzucker;Dessert V;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +12.12.2022;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +12.12.2022;Wackelpudding;mit Vanillesoße;Dessert;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +13.12.2022;Rote Linsen Curry;mit Süßkartoffeln;Vegan;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +13.12.2022;Vegane Pancakes;mit Ahornsirup;Dessert V;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +13.12.2022;Gebratene Nudeln;mit Gemüse;Vegetarisch;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +13.12.2022;Berliner;mit Erdbeerfüllung;Dessert;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +14.12.2022;Bratkartoffeln;mit veganer Bratensoße;Vegan;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +14.12.2022;Pudding;mit Schokostreuseln;Dessert V;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +14.12.2022;Bratkartoffeln;mit Leberkäse und Ei;Fleisch;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +14.12.2022;Pudding;mit Vanillesoße;Dessert;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +15.12.2022;Bauerntopf;mit veganem Hack;Vegan;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate +15.12.2022;Bananenbrot;mit Datteln;DessertV;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate \ No newline at end of file From 84ded9963a6b02e7e626b0e8175185e67e4e7588 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Fri, 16 Dec 2022 08:37:51 +0100 Subject: [PATCH 21/40] toString() angepasst --- .idea/uiDesigner.xml | 124 +++++++++++++++++++++++++++++++++++++++++++ src/Menue.java | 4 +- 2 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 .idea/uiDesigner.xml diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Menue.java b/src/Menue.java index b19ea8d..8b94421 100644 --- a/src/Menue.java +++ b/src/Menue.java @@ -220,8 +220,8 @@ public class Menue { @Override public String toString() { - return "Montag\n" + "\t\t\t\t" + dish + "\n" + sideDish - + "Allergene" + "\n" + getTyp(); + return "Montag" + "\t\t\t\t" + dish + "\n" + date + "\t\t\t" + sideDish + + "\n" + "\t\t\t\t\t" + "Allergene" + "\n " + "\t\t\t\t\t" + getTyp() + "\n"; } } From 3a2e57d0393bd4b5a358e9a0b911227bcacad299 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Fri, 16 Dec 2022 08:40:05 +0100 Subject: [PATCH 22/40] toString() angepasst --- src/Menue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Menue.java b/src/Menue.java index 8b94421..c2be6c4 100644 --- a/src/Menue.java +++ b/src/Menue.java @@ -145,7 +145,7 @@ public class Menue { return ""; } } - +//adjust assignment public boolean isCrustaceans() { return crustaceans; } From 97a83dcc4610ff3eb33672c90e9dc0024bd6d415 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Fri, 16 Dec 2022 08:55:06 +0100 Subject: [PATCH 23/40] Kommentare angepasst --- src/Menue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Menue.java b/src/Menue.java index c2be6c4..c600512 100644 --- a/src/Menue.java +++ b/src/Menue.java @@ -217,7 +217,7 @@ public class Menue { public boolean isArtificialSweetener() { return artificialSweetener; } - +// add allergene and additives @Override public String toString() { return "Montag" + "\t\t\t\t" + dish + "\n" + date + "\t\t\t" + sideDish From 6f1b665c4c6fa3eef5dc121141381ec0b34ba6dd Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Fri, 16 Dec 2022 09:13:18 +0100 Subject: [PATCH 24/40] getTyp() angepasst --- src/Menue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Menue.java b/src/Menue.java index c600512..477159b 100644 --- a/src/Menue.java +++ b/src/Menue.java @@ -105,7 +105,7 @@ public class Menue { } public String getTyp() { - if (typ.equals("DessertV") || typ.equals("Dessert")) { + if (typ.contains("DessertV") || typ.contains("Dessert")) { return ""; } else { From eb249cb685d43ffba2bd0c879741f44efddf19a5 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sat, 17 Dec 2022 13:31:21 +0100 Subject: [PATCH 25/40] =?UTF-8?q?readMenue()=20List<>ingredients=20hinzuge?= =?UTF-8?q?f=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Data.java | 213 +++++++++++++++++++++++--------------------------- 1 file changed, 99 insertions(+), 114 deletions(-) diff --git a/src/Data.java b/src/Data.java index 16d3d84..68a00ed 100644 --- a/src/Data.java +++ b/src/Data.java @@ -2,6 +2,7 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.sql.Array; import java.util.ArrayList; import java.util.List; @@ -56,131 +57,115 @@ public class Data { List rows = getRows(); ArrayList menueList = new ArrayList<>(); + + for (String row : rows) { + String[] parts = row.split(";"); + String date = parts[0]; String dish = parts[1]; String sideDish = parts[2]; String typ = parts[3]; - String allergens = parts[4]; + String ingredient = parts[4]; + List ingredients = new ArrayList<>(); - boolean eggs = false; - if (!allergens.isEmpty()) { - eggs = true; - - } - allergens = parts[5]; - boolean peanuts = false; - if (!allergens.isEmpty()) { - peanuts = true; - } - allergens = parts[6]; - boolean fish = false; - if (!allergens.isEmpty()) { - fish = true; - } - allergens = parts[7]; - boolean grains = false; - if (!allergens.isEmpty()) { - grains = true; - } - allergens = parts[8]; - boolean crustaceans = false; - if (!allergens.isEmpty()) { - crustaceans = true; - } - allergens = parts[9]; - boolean lupines = false; - if (!allergens.isEmpty()) { - lupines = true; - } - allergens = parts[10]; - boolean milk = false; - if (!allergens.isEmpty()) { - milk = true; - } - allergens = parts[11]; - boolean nuts = false; - if (!allergens.isEmpty()) { - nuts = true; - } - allergens = parts[12]; - boolean sulfurDioxideAndSulfite = false; - if (!allergens.isEmpty()) { - sulfurDioxideAndSulfite = true; - } - allergens = parts[13]; - boolean celeriac = false; - if (!allergens.isEmpty()) { - celeriac = true; - } - allergens = parts[14]; - boolean mustards = false; - if (!allergens.isEmpty()) { - mustards = true; - } - allergens = parts[15]; - boolean sesame = false; - if (!allergens.isEmpty()) { - sesame = true; - } - allergens = parts[16]; - boolean soy = false; - if (!allergens.isEmpty()) { - soy = true; - } - allergens = parts[17]; - boolean molluscs = false; - if (!allergens.isEmpty()) { - molluscs = true; - } - String additives = parts[18]; - boolean antioxidant = false; - if (!additives.isEmpty()) { - antioxidant = true; - } - additives = parts[19]; - boolean artificialColours = false; - if (!additives.isEmpty()) { - artificialColours = true; - } - additives = parts[20]; - boolean flavourEnhancer = false; - if (!additives.isEmpty()) { - flavourEnhancer = true; - } - additives = parts[21]; - boolean preservatives = false; - if (!additives.isEmpty()) { - preservatives = true; - } - additives = parts[22]; - boolean nitrate = false; - if (!additives.isEmpty()) { - nitrate = true; - } - additives = parts[23]; - boolean picklingSalt = false; - if (!additives.isEmpty()) { - picklingSalt = true; - } - additives = parts[24]; - boolean phosphate = false; - if (!additives.isEmpty()) { - phosphate = true; - } - additives = parts[25]; - boolean artificialSweetener = false; - if (!additives.isEmpty()) { - artificialSweetener = true; + if (!ingredient.isEmpty()) { + ingredients.add("a"); //eggs } - menueList.add(new Menue(date, dish, sideDish, typ, eggs, peanuts, fish, grains, - crustaceans, lupines, milk, nuts, sulfurDioxideAndSulfite, celeriac, mustards, sesame, - soy, molluscs, antioxidant, artificialColours, flavourEnhancer, preservatives, nitrate, - picklingSalt, artificialSweetener, phosphate)); + ingredient = parts[5]; + if (!ingredient.isEmpty()) { + ingredients.add("d"); //peanuts + } + ingredient = parts[6]; + if (!ingredient.isEmpty()) { + ingredients.add("m"); //fish + } + ingredient = parts[7]; + if (!ingredient.isEmpty()) { + ingredients.add("g"); //grains + } + ingredient = parts[8]; + if (!ingredient.isEmpty()) { + ingredients.add("f"); //crustaceans + } + ingredient = parts[9]; + if (!ingredient.isEmpty()) { + ingredients.add("n"); //lupines + } + ingredient = parts[10]; + if (!ingredient.isEmpty()) { + ingredients.add("c"); //milk + } + ingredient = parts[11]; + if (!ingredient.isEmpty()) { + ingredients.add("k"); //nuts + } + ingredient = parts[12]; + if (!ingredient.isEmpty()) { + ingredients.add("j"); //sulfurDioxideAndSulfite + } + ingredient = parts[13]; + + if (!ingredient.isEmpty()) { + ingredients.add("l"); //celeriac + } + ingredient = parts[14]; + if (!ingredient.isEmpty()) { + ingredients.add("h"); //mustards + } + ingredient = parts[15]; + if (!ingredient.isEmpty()) { + ingredients.add("i"); //sesame + } + ingredient = parts[16]; + if (!ingredient.isEmpty()) { + ingredients.add("b");//soy + } + ingredient = parts[17]; + if (!ingredient.isEmpty()) { + ingredients.add("e");//molluscs + } + ingredient = parts[18]; + if (!ingredient.isEmpty()) { + ingredients.add("4"); //antioxidant + } + ingredient = parts[19]; + if (!ingredient.isEmpty()) { + ingredients.add("5"); + } + ingredient = parts[20]; + if (!ingredient.isEmpty()) { + ingredients.add("6"); //flavourEnhancer + } + ingredient = parts[21]; + if (!ingredient.isEmpty()) { + ingredients.add("8"); // preservatives + } + ingredient = parts[22]; + + if (!ingredient.isEmpty()) { + ingredients.add("3"); //nitrate + } + ingredient = parts[23]; + if (!ingredient.isEmpty()) { + ingredients.add("1");//picklingSalt + } + ingredient = parts[24]; + if (!ingredient.isEmpty()) { + ingredients.add("7"); //artificialSweetener + } + ingredient = parts[25]; + if (!ingredient.isEmpty()) { + ingredients.add("2"); //phosphate + + } + String end = parts[26]; //endpoint + + menueList.add(new Menue(date, dish, sideDish, typ, ingredients)); } return menueList; } From 61ba486e4f0b5ecf98922a016185d99bff678cfa Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sat, 17 Dec 2022 13:31:35 +0100 Subject: [PATCH 26/40] txt angepasst --- menue.txt | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/menue.txt b/menue.txt index a7f717c..947da7a 100644 --- a/menue.txt +++ b/menue.txt @@ -1,14 +1,14 @@ -12.12.2022;Veganes Schnitzel;mit Kroketten, Gemüse und Soße;Vegan;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -12.12.2022;Waffel;mit Puderzucker;Dessert V;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -12.12.2022;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -12.12.2022;Wackelpudding;mit Vanillesoße;Dessert;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -13.12.2022;Rote Linsen Curry;mit Süßkartoffeln;Vegan;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -13.12.2022;Vegane Pancakes;mit Ahornsirup;Dessert V;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -13.12.2022;Gebratene Nudeln;mit Gemüse;Vegetarisch;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -13.12.2022;Berliner;mit Erdbeerfüllung;Dessert;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -14.12.2022;Bratkartoffeln;mit veganer Bratensoße;Vegan;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -14.12.2022;Pudding;mit Schokostreuseln;Dessert V;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -14.12.2022;Bratkartoffeln;mit Leberkäse und Ei;Fleisch;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -14.12.2022;Pudding;mit Vanillesoße;Dessert;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -15.12.2022;Bauerntopf;mit veganem Hack;Vegan;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate -15.12.2022;Bananenbrot;mit Datteln;DessertV;eggs;peanuts;fish;grains;crustaceans;lupines;milk;nuts;sulfurDioxideAndSulfite;celeriac;mustards;sesame;soy;molluscs;antioxidant;artificialColours;flavourEnhancer;preservatives;nitrate;picklingSalt;artificialSweetener;phosphate \ No newline at end of file +12.12.2022;Veganes Schnitzel;mit Kroketten, Gemüse und Soße;Vegan;x;;;;;;x;;;;x;;;;;;;x;;;;;x +12.12.2022;Waffel;mit Puderzucker;Dessert V;;;x;;x;;;;;x;;;;;;;x;;;;;;x +12.12.2022;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch;;;x;;;;;x;;;x;;;;;;;;x;;;;x +12.12.2022;Wackelpudding;mit Vanillesoße;Dessert;;;x;;;;;x;;;;;;;;x;;;;;x;;x +13.12.2022;Rote Linsen Curry;mit Süßkartoffeln;Vegan;;;x;;;;;;;;x;;;;;;x;;;;;;x +13.12.2022;Vegane Pancakes;mit Ahornsirup;Dessert V;x;;;;x;;;;x;;;;;x;;;;;;;;;x +13.12.2022;Gebratene Nudeln;mit Gemüse;Vegetarisch;;;;;;x;;;x;;x;;x;;;x;;;;;;;x +13.12.2022;Berliner;mit Erdbeerfüllung;Dessert;;;x;;;x;;;;x;;;;;x;;;;;x;;;x +14.12.2022;Bratkartoffeln;mit veganer Bratensoße;Vegan;;x;;;;x;;;;;;x;;;;;x;;;;;;x +14.12.2022;Pudding;mit Schokostreuseln;Dessert V;x;;x;;;x;;;x;;;;;;;x;;;;;;;x +14.12.2022;Bratkartoffeln;mit Leberkäse und Ei;Fleisch;;;;x;;x;;;x;;;;x;;;;;;;;;;x +14.12.2022;Pudding;mit Vanillesoße;Dessert;;;x;;;x;;x;;;x;;;;;;x;;;;;;x +15.12.2022;Bauerntopf;mit veganem Hack;Vegan;;x;;;;;;;;;x;;;;x;;;;x;;;;x +15.12.2022;Bananenbrot;mit Datteln;DessertV;;;x;;;x;;;;x;;;;;x;;;;;;;;x \ No newline at end of file From 5f0191d6cd70b69d5185f6a020109a52cd4ba67b Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sat, 17 Dec 2022 13:32:41 +0100 Subject: [PATCH 27/40] =?UTF-8?q?Klasse=20ingredients=20gek=C3=BCrzt=20in?= =?UTF-8?q?=20List?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Menue.java | 186 +++---------------------------------------------- 1 file changed, 10 insertions(+), 176 deletions(-) diff --git a/src/Menue.java b/src/Menue.java index 477159b..949f94a 100644 --- a/src/Menue.java +++ b/src/Menue.java @@ -1,94 +1,33 @@ +import java.util.List; + /** * Menue is a class to built a menue * * @author: Madeleine Vigier * @version: 1.0 */ -public class Menue { +public class Menue{ String date; String dish; String sideDish; String typ; - boolean eggs; - boolean peanuts; - boolean fish; - boolean grains; - boolean crustaceans; - boolean lupines; - boolean milk; - boolean nuts; - boolean sulfurDioxideAndSulfite; - boolean celeriac; - boolean mustards; - boolean sesame; - boolean soy; - boolean molluscs; - boolean antioxidant; - boolean artificialColours; - boolean flavourEnhancer; - boolean preservatives; - boolean nitrate; - boolean picklingSalt; - boolean phosphate; - boolean artificialSweetener; + List ingredients; + /** * constructor - * - * @param date date of meal + * @param date date of meal * @param dish meal * @param sideDish side dish * @param typ vegan, vegetarian or meat - * @param eggs allergens - * @param peanuts allergens - * @param fish allergens - * @param grains allergens - * @param crustaceans allergens - * @param lupines allergens - * @param milk allergens - * @param nuts allergens - * @param sulfurDioxideAndSulfite additives - * @param celeriac additives - * @param mustards additives - * @param sesame additives - * @param soy additives - * @param molluscs additives - * @param antioxidant additives - * @param artificialColours additives - * @param flavourEnhancer additives - * @param preservatives additives - * @param nitrate additives - * @param picklingSalt additives - * @param phosphate additives - * @param artificialSweetener additives + * @param ingredients list of ingredients */ - public Menue(String date, String dish, String sideDish, String typ, boolean eggs, boolean peanuts, boolean fish, boolean grains, boolean crustaceans, boolean lupines, boolean milk, boolean nuts, boolean sulfurDioxideAndSulfite, boolean celeriac, boolean mustards, boolean sesame, boolean soy, boolean molluscs, boolean antioxidant, boolean artificialColours, boolean flavourEnhancer, boolean preservatives, boolean nitrate, boolean picklingSalt, boolean phosphate, boolean artificialSweetener) { + public Menue(String date, String dish, String sideDish, String typ, List ingredients) { this.date = date; this.dish = dish; this.sideDish = sideDish; this.typ = typ; - this.eggs = eggs; - this.peanuts = peanuts; - this.fish = fish; - this.grains = grains; - this.crustaceans = crustaceans; - this.lupines = lupines; - this.milk = milk; - this.nuts = nuts; - this.sulfurDioxideAndSulfite = sulfurDioxideAndSulfite; - this.celeriac = celeriac; - this.mustards = mustards; - this.sesame = sesame; - this.soy = soy; - this.molluscs = molluscs; - this.antioxidant = antioxidant; - this.artificialColours = artificialColours; - this.flavourEnhancer = flavourEnhancer; - this.preservatives = preservatives; - this.nitrate = nitrate; - this.picklingSalt = picklingSalt; - this.phosphate = phosphate; - this.artificialSweetener = artificialSweetener; + this.ingredients = ingredients; } @@ -113,115 +52,10 @@ public class Menue { } } - public String getEggs() { - if (eggs) { - return "a"; - } else { - return ""; - } - - } - - public String getPeanuts() { - if (peanuts) { - return "d"; - } else { - return ""; - } - } - - public String getFish() { - if (fish) { - return "m"; - } else { - return ""; - } - } - - public String getGrains() { - if (grains) { - return "a"; - } else { - return ""; - } - } -//adjust assignment - public boolean isCrustaceans() { - return crustaceans; - } - - public boolean isLupines() { - return lupines; - } - - public boolean isMilk() { - return milk; - } - - public boolean isNuts() { - return nuts; - } - - public boolean isSulfurDioxideAndSulfite() { - return sulfurDioxideAndSulfite; - } - - public boolean isCeleriac() { - return celeriac; - } - - public boolean isMustards() { - return mustards; - } - - public boolean isSesame() { - return sesame; - } - - public boolean isSoy() { - return soy; - } - - public boolean isMolluscs() { - return molluscs; - } - - public boolean isAntioxidant() { - return antioxidant; - } - - public boolean isArtificialColours() { - return artificialColours; - } - - public boolean isFlavourEnhancer() { - return flavourEnhancer; - } - - public boolean isPreservatives() { - return preservatives; - } - - public boolean isNitrate() { - return nitrate; - } - - public boolean isPicklingSalt() { - return picklingSalt; - } - - public boolean isPhosphate() { - return phosphate; - } - - public boolean isArtificialSweetener() { - return artificialSweetener; - } -// add allergene and additives @Override public String toString() { return "Montag" + "\t\t\t\t" + dish + "\n" + date + "\t\t\t" + sideDish - + "\n" + "\t\t\t\t\t" + "Allergene" + "\n " + "\t\t\t\t\t" + getTyp() + "\n"; + + "\n" + "\t\t\t\t\t" + ingredients + "\n " + "\t\t\t\t\t" + getTyp() + "\n"; //replace("[","").replace("]","") } } From 4b51db302e0aa610f8d84c6c7e2b35402de2e67b Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sat, 17 Dec 2022 13:33:23 +0100 Subject: [PATCH 28/40] =?UTF-8?q?Legenede=20ingredients=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Execute.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Execute.java b/src/Execute.java index 83577d1..f715f31 100644 --- a/src/Execute.java +++ b/src/Execute.java @@ -10,10 +10,16 @@ public class Execute { Data data = new Data("menue.txt"); ArrayList menue = data.readMenue(); - + String[]tage = {"Montag","Dienstag", "Mittwoch", "Donnerstag", "Freitag"}; for (Menue m : menue) { + System.out.println(m); } + + System.out.println("a: Eier; b: Soja, c: Milch; d: Erdnüsse; e: Weichtiere; f: Krebstiere; g: Getreide; h: Senf\n" + +"i: Sesam; j: Schwefeldioxid und Sulfit; k: Nüsse; l: Sellerie; m: Fische; n: Lupinen\n" + +"1: Nitrit-Pökelsalz; 2: Phosphat; 3: Nitrat; 4: Antioxidationsmittel; 5: Farbstoff;\n" + +"6: Geschmacksverstärker; 7: Süßungsmittel; 8: Konservierungsstoff"); } // Data datei = new Data("users.txt"); // ArrayList user = datei.readUser(); From 536d7fe1fbd624c8d12a905539c129c825ff4495 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sat, 17 Dec 2022 17:28:18 +0100 Subject: [PATCH 29/40] =?UTF-8?q?15.12/16.12=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- menue.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/menue.txt b/menue.txt index 947da7a..1d96367 100644 --- a/menue.txt +++ b/menue.txt @@ -1,4 +1,4 @@ -12.12.2022;Veganes Schnitzel;mit Kroketten, Gemüse und Soße;Vegan;x;;;;;;x;;;;x;;;;;;;x;;;;;x +12.12.2022;Veganes Schnitzel;mit Kroketten und Gemüse;Vegan;x;;;;;;x;;;;x;;;;;;;x;;;;;x 12.12.2022;Waffel;mit Puderzucker;Dessert V;;;x;;x;;;;;x;;;;;;;x;;;;;;x 12.12.2022;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch;;;x;;;;;x;;;x;;;;;;;;x;;;;x 12.12.2022;Wackelpudding;mit Vanillesoße;Dessert;;;x;;;;;x;;;;;;;;x;;;;;x;;x @@ -11,4 +11,10 @@ 14.12.2022;Bratkartoffeln;mit Leberkäse und Ei;Fleisch;;;;x;;x;;;x;;;;x;;;;;;;;;;x 14.12.2022;Pudding;mit Vanillesoße;Dessert;;;x;;;x;;x;;;x;;;;;;x;;;;;;x 15.12.2022;Bauerntopf;mit veganem Hack;Vegan;;x;;;;;;;;;x;;;;x;;;;x;;;;x -15.12.2022;Bananenbrot;mit Datteln;DessertV;;;x;;;x;;;;x;;;;;x;;;;;;;;x \ No newline at end of file +15.12.2022;Bananenbrot;mit Datteln;DessertV;;;x;;;x;;;;x;;;;;x;;;;;;;;x +15.12.2022;Bauerntopf;mit veganem Hack;Vegan;;x;;;;;;;;;x;;;;x;;;;x;;;;x +15.12.2022;Bananenbrot;mit Datteln;DessertV;;;x;;;x;;;;x;;;;;x;;;;;;;;x +16.12.2022;Bauerntopf;mit veganem Hack;Vegan;;x;;;;;;;;;x;;;;x;;;;x;;;;x +16.12.2022;Bananenbrot;mit Datteln;DessertV;;;x;;;x;;;;x;;;;;x;;;;;;;;x +16.12.2022;Bauerntopf;mit veganem Hack;Vegan;;x;;;;;;;;;x;;;;x;;;;x;;;;x +16.12.2022;Bananenbrot;mit Datteln;DessertV;;;x;;;x;;;;x;;;;;x;;;;;;;;x \ No newline at end of file From bf8cf182db3c92cc024153e2167168dd821683eb Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sat, 17 Dec 2022 17:28:35 +0100 Subject: [PATCH 30/40] ausgabe angepasst --- out/production/VPR_SCRIPT/Execute.class | Bin 1263 -> 1815 bytes src/Execute.java | 13 +++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/out/production/VPR_SCRIPT/Execute.class b/out/production/VPR_SCRIPT/Execute.class index 784d629a174ee0122e77c0741eca8a840b3e4a8c..38c9f6487dfec6e1aafa35c65c87db44375f5f53 100644 GIT binary patch literal 1815 zcma)6-%}e^6#gy=EG&VP@S{JJx>Z{P1!8~Enne^_Kx_ikRBEX@vm`g!fs^TpmU$yoZf3#vor9bTLfgbJ zMhuK5Fou%?!x3bs4O0o!BVsVMl|G!t83QjR@G{0bm=q3zP*!PGYmm=qE1Ifh)|pwz z{G?N5v{zsmIG4byx(=;qoi+kSU3<7*FJ2e8F#W$C4SYeP4roH@1ST-aRJNr~CB4$- z{;!JL2BrkMqw1Krh?xX3c$2~D!orj7$n%OtUhM*#xQr_Xt|o8|vjT(5(v!a9=4Du^ zl>&ienP2jEnbhdRt*x6p#LgbvRwWy?TTU%MHP}^~) ztYX&6E4Ns&trE}tl6Uwt2&8SvtaVSSVkM+Gx83 zqpm#ZnU`p-ct6AG^~2__bOXnIWLuZB)_SED)GH1Fue40Gcr|M+cwrRN;o=2V6^7Ea zt!o5#d=jXY%eFbI^Jl24Q``;qq#uNb-}<|{FxQ#U;nTyf8{YN{-y0-PDCzI982TVW zG4VF$4ZM@UyIAPF%hBh=+n|EQYCSxN?*68Mn^Z0C%VI-ckoe77iAyp^maT^0b+%k; zQn^~uaW@=a>3v%n4=ainq%YU@w+T>nlqWEjesJ_YOl$}U#s3QJ9Dkdx!^fEMu*5OJ z`H|D(f}q{euz2wSc7Dn{AL~r+p#D6;v&YScxm@&x*z@!pD1Eif)&DRVz zk72OMWMs=gP>y>}H7d@LsU=_*Y7M_Amy|AFqFtdGZHRMtkHb?xF%S?veBa_O!&PwY zo_qrF1BEUu@~w}-8MwrEqGf<(yw6=9R`3BebQU87i&N+S0^@$F?+N;I7n>N&$L7bU znn-LD9D0#zc43Gz!6*U{QDd4WtXh zFL0v^H7P+8b?w$)VB+4r3-rts6B9GZdpYyI?>XOjnfU3&zHWc`1f1jcdhBz%Z>iN- zt+$@68isQD%5wc#y|~s|S}D%&;N>`JGM0Tl`^g$o|Bo2#qx#cY<3-EhQ4D^A<*cIL8(@aAI#1r67ZNOQ=~z^G`Xlyk%G)Gf8Sj#)PIO7t zCb!sY*dVQ9*wFsM!5Q}*htqDC!mHmu0x~xw%ZLtQ`h1ckD<1c4_*y>V_)QKv menue = data.readMenue(); - String[]tage = {"Montag","Dienstag", "Mittwoch", "Donnerstag", "Freitag"}; - for (Menue m : menue) { - System.out.println(m); + for (int i = 0; i < menue.size(); i++) { + if (i % 4 == 0) { + System.out.println(); + System.out.println("--------------------------------------"); + System.out.println(GeneralMethods.getDayNumberNew(menue.get(i).getDate())); + System.out.println(menue.get(i).getDate()); + System.out.println(); + } + System.out.println(menue.get(i)); } System.out.println("a: Eier; b: Soja, c: Milch; d: Erdnüsse; e: Weichtiere; f: Krebstiere; g: Getreide; h: Senf\n" From 27b2186c8721834fb4ceb2132cbc958fd6ecfe80 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sat, 17 Dec 2022 17:29:42 +0100 Subject: [PATCH 31/40] Tagname aus Datum erzeugt --- .../VPR_SCRIPT/GeneralMethods.class | Bin 4048 -> 1420 bytes src/GeneralMethods.java | 247 +++++++++++------- 2 files changed, 148 insertions(+), 99 deletions(-) diff --git a/out/production/VPR_SCRIPT/GeneralMethods.class b/out/production/VPR_SCRIPT/GeneralMethods.class index 2ad1d63cfea99ef7fce8904a45fafa2efcff6926..f35d2d247871fbacfa89873d01fc67d8ac1e6ee1 100644 GIT binary patch literal 1420 zcma)6+fvg|6kP|}Can>%;Dvg>m!hqA(R!zXXj2{Q;P`lG4>Vd54W}}Ef`8#BR3DJ> z!4L4G9M?%oX9uipUf!_8m>qZSell1K@Re~@2fsV)80(yQeU zs-Xo^_dVa!4+Tc^(@QpNflRYmblu`6uM9HSXTfo>A7cV%qj2r5snSXiu1Q_0NUh#d zpN~|nLV*)X`U120>Tbrm4n2RhJRN`fFG@L$aU8UebufX+9o`-7wM*5YA=^s8 zT6p%xeNuZbkc|NctYyRdu!AEw%5pY5-P(!TAvEZ`CqfzIaLmGS2Pbe+U}Cou5wz)p zK=P9e*D33RWzV%_SXZAr%5SLhUTPoY(+6isIh=NI24@AFRi!I(^VP~br9KKA$q$C~ z4GcMt3l=UqxP<%==f01CO{^u^?vOS&U@?ONW-MHGa0Nwyu?6L;P_|vATS0T3-HcP$ zydVon(Jx35j0vhZWFH(_{Mon3gp=b2o$AoTqq&Hq2CR`>!k8uQ1QyT&o z2gftKm4kJdKY?S79r|lF?2(TDgJ|*3?`62G%Yd?X1Kzt+<`9~4bJ*G+7K=&K8aG2g zEDG$eYuWhd%1^yEWa>dDY^Zt9G-_hF7e%wPT%ZEa1apmo8;ca5cd3;q1!c1E6XH8x zMsSZ$V+JNs=F^ECc&OmSgNqCyOY$9O_5g=2V%Ii{NAF;u}bB22-?JQi3( z+AM01##dSl-9j$$4XJFYn@bvbt(!|3d83=NjJ(y&*+$;!3d3hKDzu1wd@qsJRbpRf vrW-tiZs8Da<0xkN+utSAGA^+EJPY4#NCD5W$k-RWEhKG=7iqktI)dsyg+)`& literal 4048 zcmcInOK=p|6+KV$>G`xi76>#3^9f)WeUK6Ugc%T)27!e~LP4@XU}IV{ji%A4d+6yA zk{z6{ou5q-=VRj}CZC12cq436q_XlN(Eoq}zJ_jBPl&tso}QUfnxx6m?G@Llmm?-z?CvFMB`2gku}# zY&tm=gMwCR(I&9Lx1f9PxVztu4GK1@=)fkLxGpM=QS2MEZEY!Ql$mEl=Ab#2%>?%) zy)drLh_6q_(TRkDhgEFB)@rJCCIU)9E05`m^hdbo>jJ$M)QEgqz4;G6O9v>g|F=b9 zXOSh(NKJdz%4x+Z%{Jt-uM9c`gNNF(^={IP>-NAg&Cvw99>`UF zU$gspd3hOY-QZwdxE|T@o!;)cnZ&4qiFT}Q*L0K2sKmZ-#|%;C-Nby;|H^_hr5@{2 zsfxF@j@QP~;q}=LFkZ9UucKPY=PEj3%$k~0v6VESkKw*JcOo6@r8iPrHMqgWiw=WV^rMB=4_WpWD0LgOrv=Q0JO$Xy1D$lCQha#Uze#;TZ1 zDJoO)<(Qk7|DgKGRqfnb_s$2Iqg$x;|aa zmHbX`4ddrAyoI+F+>pcW9Rj@HbcVTL&FOvKVDaYPaV^L9E$id$S|Glm=kyuP%=4YF zJ8M~Ul~Q_rThwUk4oX?6aucahPG#Rh7KqE;^J zWd%0{_N;^1D0>CJ5!m*>O*xZ1sC?U;<+qjm34+anFn^!pQy*8sHPm$*;ynsYIM3g5 z8)(Dx{H=NhcmWsq6vd0UNGo~xQ#uN9&D?=9eFxELI*H##%V_rs9vbWY0GkDFU<-vu z1pa`XsbEhcxPo0hD|mEy^{-r#%ZQ9}-T$5&B!wgVs0g|#bRkC9olGKuBpzm_TW}Ct z@gyEW3Oi`I4Fmib8X`8C=HpBy$uk;e=%Ec=$RW=}2l%Apl8ZirS?11)f}f#7fuf-E9(Jsfk0u2>6~4cOf}SAeY19OhY*;9HYy?jt!hMKqU4gsU z`92P0yWhuCqh0MsR&ewNUb=(!>D$PR^?ZP10;ymk=o557Nsr?Y-62KIz6k|G@Z1zi|BJ)w?pllpElc2L_n=!U24MTnM^_3sJXniT0=3xWxKX z4=u00(|fC0M&cF%yp%V@0_*5H{^_ot2-{t~y7~wQczM0FdJHZ6Ox?_?+Ro3^Bdo0B z{GQC>5Kgng&hne`0{*p;T!%d#Jixc<=Bls96@h5)J z{h1#A!W;M-#_)H}t$$z~pU~r{m|#ymC$?cq?8RBp%deY*I42I_yf}*I#V}qF&*FkO zjTgl7fl`c!_TVa|IK6DgA|;g`Icg*H>5w}KjHZ!3xjT^3b{zTnMTOS z6Zod|M_&58oXJiS-;(~w(JnW8l}v5Lx2bC;UmY%v7BbR;SE*|ycZ!Rsjf{_b8Ib=n zUULz(2p!+SchN*X*XDz`#v7htbwq`O@8bvleCVQu$Hg4E@K8|ly-A(t?R5?UIXwmu zU&UU8+==mqf?>`L4iexV^7kMhvE9i!oMJfYUaxinZS?MrtKo#2k3rNx8Kp> zWvJbL^9AJW_6oekwQ_hB3#4Vq9gaJ^ll}~+4|fm}0i_?4kfxeJC^d6Flpvba$lA0E g;7y)r!cXv1t`TPUGyeYte#NI4rFZdb{1%D-0N78;xBvhE diff --git a/src/GeneralMethods.java b/src/GeneralMethods.java index 603906a..a357ddc 100644 --- a/src/GeneralMethods.java +++ b/src/GeneralMethods.java @@ -4,120 +4,169 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.time.DayOfWeek; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.List; +import java.util.Locale; -/**GeneralMethods is a class for commen public methods. - * - * @auhtor Felix Wöstemeyer +/** + * GeneralMethods is a class for commen public methods. * * @version 1.0 + * @auhtor Felix Wöstemeyer */ public class GeneralMethods { - /**The method writeData saves the given data to a certain file. - * - * @param pathWrite the given filepath to write - * @param data the data to be saved + + /** + * The method getDayNumberNew() gets the Number of day in week + * @param dateString date as String e.g. 12.12.2022 + * @return the Number of day in week + * @version 1.0 + * @author Madeleine Vigier */ - public static void writeData(String pathWrite, ArrayList data){ - try{ - BufferedWriter writer = new BufferedWriter(new FileWriter(pathWrite)); - for (String d : data) { - writer.write(d); - writer.newLine(); - } - writer.close(); - } catch (IOException e) { - e.printStackTrace(); - } + public static String getDayNumberNew(String dateString) { + + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd.MM.yyyy"); + formatter = formatter.withLocale(Locale.GERMANY); // Locale specifies human language for translating, and cultural norms for lowercase/uppercase and abbreviations and such. Example: Locale.US or Locale.CANADA_FRENCH + LocalDate date = LocalDate.parse(dateString, formatter); + + DayOfWeek day = date.getDayOfWeek(); + return getDayName(day.getValue()); } /** - * Author: Sabine Gubitz - *ddd - * 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 + * The method getDayName() gets the weekday + * @param dayNumber dayNumber e.g. 1 for Monday + * @return weekday + * @version 1.0 + * @author Madeleine Vigier */ - public static ArrayList readData(String pathRead) { - Path path = Paths.get(pathRead); - - try { - List rows = Files.readAllLines(path); - - if (pathRead.equals("menue.txt")) { - 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.equals("users.txt")){ - 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]; - String password = parts[5]; - } - return userList; - - } else if (pathRead.equals("orders.txt")) { - 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(); + public static String getDayName(int dayNumber) { + if (dayNumber == 1) { + return "Montag"; } + if (dayNumber == 2) { + return "Dienstag"; + } + if (dayNumber == 3) { + return "Mittwoch"; + } + if (dayNumber == 4) { + return "Donnerstag"; + } + if (dayNumber == 5) { + return "Freitag"; + } + return null; } - - /** - * The method writeData2 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.equals("users.txt")) { - - } else if (pathWrite.equals("orders.txt")) { - - } - } +// /**The method writeData saves the given data to a certain file. +// * +// * @param pathWrite the given filepath to write +// * @param data the data to be saved +// */ +// public static void writeData(String pathWrite, ArrayList data){ +// try{ +// BufferedWriter writer = new BufferedWriter(new FileWriter(pathWrite)); +// for (String d : data) { +// writer.write(d); +// writer.newLine(); +// } +// writer.close(); +// } catch (IOException e) { +// e.printStackTrace(); +// } +// } +// +// /** +// * Author: Sabine Gubitz +// *ddd +// * 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 static ArrayList readData(String pathRead) { +// Path path = Paths.get(pathRead); +// +// try { +// List rows = Files.readAllLines(path); +// +// if (pathRead.equals("menue.txt")) { +// 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.equals("users.txt")){ +// 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]; +// String password = parts[5]; +// } +// return userList; +// +// } else if (pathRead.equals("orders.txt")) { +// 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 writeData2 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.equals("users.txt")) { +// +// } else if (pathWrite.equals("orders.txt")) { +// +// } +// } } From 7d2b03d5842810814e0f1d9dc638fff202fda901 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sat, 17 Dec 2022 17:30:04 +0100 Subject: [PATCH 32/40] toString() angepasst --- src/Menue.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Menue.java b/src/Menue.java index 949f94a..3e9f662 100644 --- a/src/Menue.java +++ b/src/Menue.java @@ -52,10 +52,12 @@ public class Menue{ } } + + @Override public String toString() { - return "Montag" + "\t\t\t\t" + dish + "\n" + date + "\t\t\t" + sideDish - + "\n" + "\t\t\t\t\t" + ingredients + "\n " + "\t\t\t\t\t" + getTyp() + "\n"; //replace("[","").replace("]","") + return dish + "\n" + sideDish + + "\n" + ingredients.toString().replace("[","").replace("]","") + "\n" + getTyp() + "\n"; } } From 455e92a986197405e0c935ce4dca3be795cc239b Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sat, 17 Dec 2022 17:30:43 +0100 Subject: [PATCH 33/40] bla --- out/production/VPR_SCRIPT/Data.class | Bin 0 -> 4869 bytes out/production/VPR_SCRIPT/Menue.class | Bin 0 -> 2058 bytes out/production/VPR_SCRIPT/Order.class | Bin 0 -> 240 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 out/production/VPR_SCRIPT/Data.class create mode 100644 out/production/VPR_SCRIPT/Menue.class create mode 100644 out/production/VPR_SCRIPT/Order.class diff --git a/out/production/VPR_SCRIPT/Data.class b/out/production/VPR_SCRIPT/Data.class new file mode 100644 index 0000000000000000000000000000000000000000..54ef9a1f9c13a9b92eb7edcc92961db3b252c6e4 GIT binary patch literal 4869 zcmb_gdvH|M8ULM|-Q2soH%~~&s=P{sJb;)ek8Y4cc~~HUKp?!;o9rdou-RR9Z-7vu z;;SlZePTe=iq@!Yt+o(e1yR~MW2gPA<8-F|qyN;tr!$@DAMH$~zjOEQ-MuC{by_Cu z_nq@Q=R4o|o@e*NPcB>rumo3wP*9}8r^An8f%1N1ztI#o61`0uy8F!@OQ3j3ED^Jo z3KZ4VcLks!pdzRv1YN+l(y$BxEoE4Jn@l4rP}!E3&}pS(iQd*A_mt`=L%D$3Yg(I< z2Qpk(SD#%vXvN}9ZLy5is-jY0lD*%aT%JxFLlOz10!1NIp<2Zh9W@9Gl;+pTB~&72 znQ6mHrUj}!ve!8Ctsz{G8&piyF%8qHL0&>`2^H)!GV9HQl*jAtkUM7T_!4IEt_gd3 za!z)Ek*N8N9@}Mau3?UV;Qeb+ucHBt0{%=Y9;5I%b>r<+zjOSYig`SFOU6tGF&9nJ zOE(E5C)hoH@BeG2zDwG_MaRv!g=R6LbaPdq2H8kyt=}PUx=_a=XR+IE-_!`Mx4QomIHMEh$HLNG;)6hW@ z)3Ax8Tf=4&Q$rWYEgH6wEYPrnWTA##B#SlNPI9w`J4u=~bdxO7z-x#W6?^EFb~7<( z24SL4S~w=Kv+#aS9RDx&%m;aWmxjFpfkFB-Gv7MM;I74hj)XLBvAJ*1h-WmU1cJ$Q z)LoKBMunwg5c_i}l87an_Qc|5QwNie301_@5@?-3@d@I}$vuw@2I@f!sW_zL>o`2_ znAJRs$LMM1`SN(YEtZhO+0J=hNfV^@T{(eNd(DPb2Ybwv6-y?97{)z1j>zIumSVlI zIxVAT@8-18V}2^k95>X{(Y_VQDB&`x#QMR3ZZo~v=#F!yvMt$T#Jh}iOpcvNpVb$m zs>N-xTD7uL$ScU45}1<9W^cjaB7e$ATii8i0_zEc62^epVWiE3)$AFyaMT@($CpQ= zX*0w9p;TWo!SIqw(t2{=ioRH!Xu>X>nalw?n(j*{5Ab6AefiAT)5oi2Vo`IY%@$chGW6Lt(q=S9>(YSv0WDKxCTOg{ zfK1q|HKt9hwS5xRR&i8d#%F1lTSbvly$v$usMmmL@MNB1SSyl)QVZXHvzK)tAc-^O zCvVV+L7O_0YSg5;EXJtra1KzM9a4my*IC^Q^Q6Gy<65Y+{%797R@!z@;6R#9Fx!(G zCMX0GS*lg$Q$RNGt#UK%9cP4WPCBEd|D~7-LrRKvg4LV#ypB&EDKI&!lec`RcsJLc zJ%B7Xg(mx)SPph32h%;KELyytG|7BvRm|jLMB&p%@RLs%a>eBRxR;;zakQHA5)U?< zg=lCz1N9w_6x`3xQWWvC5@0W)4-=zI(Zkj9q;$g= zO4=@>V*6Q4YHvJ`$pY)=oyT{nYN!LVOziG=1}#N6%S;;+dS20>%I^r z^zHbBW}fPtiT+s;p_&~V+-FZ1878wPY!v<6z|l`$KoS6%KeM5 z5RdXc#oTuj9wVo6cLN?Lr%^^NzDX`XNz?EIxgh1$;7M{J%3p=2$oZr-9Gm%h*3)=~ z7As)`eip}QwdaUS%Vx0=7dy_m6T~W@e1gd;s#H{{xc*<*iRU@3;3Sv6kTbmR?^KA_ zRz^O@@XFyYZg|Iqkx)1|h6N{35)M@^K97ikt+r2s1@o=B`Eok05V+L^Y+vRjeZ>Xn z-ohQrT_E5ER=7aW3#@X1kQcbk1#~a4#sx~ez&aNw^#biKQ04_TxInoV*ysWkUZB$j zD!srK7ntM)wz|M%FR_MsfvCX@zVZe4Tahja(fR^6Uy?!%pF9ll8ED zuD1ahU%U=x8&KFUOPfx@LRLb;vQ4E75Q_KOVm zOAPkQ4EA>!>{l4(?=igJr**C}e1FVv{Rsp9r`U%N81NtR8_LgYr;qS=g=Qv3t~V{u zIh~30CLJhy(*k^loa{|a_%1owo9gjBaS1hPY-8+UdmP`L;nFdj z&t(e35*dWE*_;aqYCb5s=4f+)bNuPX(dIml#MrxF|GId#_6<;Gbjn1AdIg%j&gNC zf>DTpc6!yO6X;qVvjkdIL7;rSS-_i^vvA(VJT4qcC*nibw&!Z;xWt-WO7LxTrQcFN z43yheweoj)TokZk*gP%?z?5py#uCaz(cUY-Q%mIpOq_Ne%K~D{(79^k8ma{IRlg_O zEYs@W#!Ubn=9BpFI>OtG@O^=mx?$s8Ln^nU^u}Jl$en%P#s~ON;Pg|us~Vo$mim#S zyVL?L!$Lkzl87;nNBK9F5$OwzwVWMS>VeOE7b29`dsaV=x>6I^`p+00iB~Ic^6)jh z4!KM=9ar5OJl$6QhTQJaQfzu{+1r%9W8Pz9Mt2>a5UUv;aFUxj?6uc_<>~!jtVdSK zWMXlfSHpe_HMS3%gtk`POakLAE!(^6vL9ztXn6y_t=1fqZy`+Sn(0(F$Su#)f%av8 zUFojZ2_|#6TR;=*7Veodbf4RI(A19m%-dDf=(t43YE8Da=kE#pm@Gu>7=hlFZl|Y$ zg{J524*Ip@yPvQeTFAq!M!0V!{G%yVOP;|Pq9J>|mZKFX#6vc$D8v`+JFctzMo)5N z1Qs>~E*;Bo6mbhI{@g#ivI(Osaec0^lo?{WQpyf7^DBMQ_?XW*SbUa{!C8!9 z785v!X%38&@5nFE3 z60yHUTLWc24fiUg@yS+xgY}$BDkNwU1TKa|B9LrMgtKwv;_;)47e_AseB|P(ql=eE zF6Ic0X+I{Tgm13Ay6JbMtC&qmoaAWvcRrb)5yjk-(piGh3r? z2B|X!nSYQt(zh&}iL^+#ao$tBXZCTqSSc>-<4W;*C@TAS=LOya4ibq1*0=|CT;^FZ kdm5E;F%Fo<7qq2t8+R!44D%)L2l$F_1!^sPjYlZ`1+w1HTL1t6 literal 0 HcmV?d00001 diff --git a/out/production/VPR_SCRIPT/Order.class b/out/production/VPR_SCRIPT/Order.class new file mode 100644 index 0000000000000000000000000000000000000000..9b1f76288d5c480874c9f26b0904fe0a19e10753 GIT binary patch literal 240 zcmXYrO$x#=5QX2=)@rRkcmsFp!XCilMsQW^LUEtgppn`_Y`vE&!G#C#P~s$*z{|XE z@|gL2UvB_0MgbhOe7GSzv0O>o!M zQ4)rUD&@AhW>W7(RxlYSRW6Ey(8~BfbnCOa5&XoamxN$fH9D6YWg>y43o{-Q_`H=l l#FzJC?Xruk2fX Date: Sun, 18 Dec 2022 07:48:42 +0100 Subject: [PATCH 34/40] code bereinigt --- src/GeneralMethods.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GeneralMethods.java b/src/GeneralMethods.java index a357ddc..c38599b 100644 --- a/src/GeneralMethods.java +++ b/src/GeneralMethods.java @@ -21,7 +21,8 @@ public class GeneralMethods { /** * The method getDayNumberNew() gets the Number of day in week - * @param dateString date as String e.g. 12.12.2022 + * + * @param dateString date as String e.g. 12.12.2022 * @return the Number of day in week * @version 1.0 * @author Madeleine Vigier @@ -38,7 +39,8 @@ public class GeneralMethods { /** * The method getDayName() gets the weekday - * @param dayNumber dayNumber e.g. 1 for Monday + * + * @param dayNumber dayNumber e.g. 1 for Monday * @return weekday * @version 1.0 * @author Madeleine Vigier From 6d690410ece392795e50762acc9810f523c8407d Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sun, 18 Dec 2022 07:49:06 +0100 Subject: [PATCH 35/40] Kommentare angepasst --- src/Menue.java | 46 +++++++++++++++++++++++++++++----------------- src/User.java | 17 ++++++++++++----- 2 files changed, 41 insertions(+), 22 deletions(-) diff --git a/src/Menue.java b/src/Menue.java index 3e9f662..1df6d0f 100644 --- a/src/Menue.java +++ b/src/Menue.java @@ -6,7 +6,7 @@ import java.util.List; * @author: Madeleine Vigier * @version: 1.0 */ -public class Menue{ +public class Menue { String date; String dish; String sideDish; @@ -16,11 +16,12 @@ public class Menue{ /** * constructor - * @param date date of meal - * @param dish meal - * @param sideDish side dish - * @param typ vegan, vegetarian or meat - * @param ingredients list of ingredients + * + * @param date date of meal + * @param dish meal + * @param sideDish side dish + * @param typ vegan, vegetarian or meat + * @param ingredients list of ingredients */ public Menue(String date, String dish, String sideDish, String typ, List ingredients) { this.date = date; @@ -30,19 +31,24 @@ public class Menue{ this.ingredients = ingredients; } - + /** + * The method get Date() gets the date + * + * @return date + * @author Madeleine Vigier + * @version 1.0 + */ public String getDate() { return date; } - public String getDish() { - return dish; - } - - public String getSideDish() { - return sideDish; - } - + /** + * The method getTyp() gets the typ of the meal + * + * @return typ e.g. Vegan + * @author Madeleine Vigier + * @version 1.0 + */ public String getTyp() { if (typ.contains("DessertV") || typ.contains("Dessert")) { return ""; @@ -53,11 +59,17 @@ public class Menue{ } - + /** + * The method toString() returns a String representation of an object + * + * @return a String with dish, sideDish, list of ingredients and the typ of the menue + * @author Madeleine Vigier + * @version 1.0 + */ @Override public String toString() { return dish + "\n" + sideDish - + "\n" + ingredients.toString().replace("[","").replace("]","") + "\n" + getTyp() + "\n"; + + "\n" + ingredients.toString().replace("[", "").replace("]", "") + "\n" + getTyp() + "\n"; } } diff --git a/src/User.java b/src/User.java index 1c2894f..e9e4e98 100644 --- a/src/User.java +++ b/src/User.java @@ -1,5 +1,6 @@ /** * User class creates User Objects + * * @author Madeleine Vigier * @version 1.1 */ @@ -13,6 +14,7 @@ public class User { /** * constructor + * * @param nameParent1 * @param nameParent2 * @param billAddress @@ -32,7 +34,8 @@ public class User { } /** - * Methode getPhonenumber() gets the Phonenumber + * the method getPhonenumber() gets the Phonenumber + * * @return Phonenumber * @author Madeleine Vigier * @version 1.0 @@ -42,7 +45,8 @@ public class User { } /** - * Methode getPassword() gets the password + * the method getPassword() gets the password + * * @return password * @author Madeleine Vigier * @version 1.0 @@ -52,7 +56,8 @@ public class User { } /** - * Methode getNameParent1() gets nameParent1 + * the method getNameParent1() gets nameParent1 + * * @return nameParent1 * @author Madeleine Vigier * @version 1.0 @@ -62,7 +67,8 @@ public class User { } /** - * Methode getNameParent2() gets nameParent2 + * the method getNameParent2() gets nameParent2 + * * @return nameParent2 * @author Madeleine Vigier * @version 1.0 @@ -72,7 +78,8 @@ public class User { } /** - * Methode toString() returns a String representation of an object + * the methode toString() returns a String representation of an object + * * @return a String with nameParent1, nameparent2, billAdress, phonenumber, nameChildren, password * @author Madeleine Vigier * @version 1.0 From 16ab1705f042d54f0a03414b04666f3e7fa98d36 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sun, 18 Dec 2022 07:49:33 +0100 Subject: [PATCH 36/40] code bereinigt --- src/Execute.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Execute.java b/src/Execute.java index a98330e..3bca7a3 100644 --- a/src/Execute.java +++ b/src/Execute.java @@ -22,9 +22,9 @@ public class Execute { } System.out.println("a: Eier; b: Soja, c: Milch; d: Erdnüsse; e: Weichtiere; f: Krebstiere; g: Getreide; h: Senf\n" - +"i: Sesam; j: Schwefeldioxid und Sulfit; k: Nüsse; l: Sellerie; m: Fische; n: Lupinen\n" - +"1: Nitrit-Pökelsalz; 2: Phosphat; 3: Nitrat; 4: Antioxidationsmittel; 5: Farbstoff;\n" - +"6: Geschmacksverstärker; 7: Süßungsmittel; 8: Konservierungsstoff"); + + "i: Sesam; j: Schwefeldioxid und Sulfit; k: Nüsse; l: Sellerie; m: Fische; n: Lupinen\n" + + "1: Nitrit-Pökelsalz; 2: Phosphat; 3: Nitrat; 4: Antioxidationsmittel; 5: Farbstoff;\n" + + "6: Geschmacksverstärker; 7: Süßungsmittel; 8: Konservierungsstoff"); } // Data datei = new Data("users.txt"); // ArrayList user = datei.readUser(); From 0b119f66376a7d79f89627429f4d22c58058cc97 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sun, 18 Dec 2022 07:53:31 +0100 Subject: [PATCH 37/40] =?UTF-8?q?quelle=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/GeneralMethods.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GeneralMethods.java b/src/GeneralMethods.java index c38599b..9dda686 100644 --- a/src/GeneralMethods.java +++ b/src/GeneralMethods.java @@ -28,7 +28,7 @@ public class GeneralMethods { * @author Madeleine Vigier */ public static String getDayNumberNew(String dateString) { - + //https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd.MM.yyyy"); formatter = formatter.withLocale(Locale.GERMANY); // Locale specifies human language for translating, and cultural norms for lowercase/uppercase and abbreviations and such. Example: Locale.US or Locale.CANADA_FRENCH LocalDate date = LocalDate.parse(dateString, formatter); From ad6c4dec569f41ac61d6edf6b76b9d5d7c561672 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sun, 18 Dec 2022 08:45:25 +0100 Subject: [PATCH 38/40] kommentare angepasst --- .../VPR_SCRIPT/GeneralMethods.class | Bin 1420 -> 1420 bytes src/Execute.java | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/out/production/VPR_SCRIPT/GeneralMethods.class b/out/production/VPR_SCRIPT/GeneralMethods.class index f35d2d247871fbacfa89873d01fc67d8ac1e6ee1..3aebd846fe5353978c6e21fd3d1747412bd4f589 100644 GIT binary patch delta 75 zcmeC-?&03BibYU?fsH|tfsa9nL4-ktL6Sjr@@|%TO+yA&1|tRz1``He22%zB26F~c e1`7rW1}g?x25SZd23rPI20I1~2FJL6Sjb@@|%TO??Jd1_K5T1|tSu24e;R22%!6 d1~Uc;1`7sR21}rNYX(&Y8wL#q`^m|yngE?^3EKbw diff --git a/src/Execute.java b/src/Execute.java index 3bca7a3..52704c0 100644 --- a/src/Execute.java +++ b/src/Execute.java @@ -6,7 +6,7 @@ import java.util.Scanner; */ public class Execute { public static void main(String[] args) { - +//EXECUTE MENUE OVERVIEW Data data = new Data("menue.txt"); ArrayList menue = data.readMenue(); @@ -26,6 +26,8 @@ public class Execute { + "1: Nitrit-Pökelsalz; 2: Phosphat; 3: Nitrat; 4: Antioxidationsmittel; 5: Farbstoff;\n" + "6: Geschmacksverstärker; 7: Süßungsmittel; 8: Konservierungsstoff"); } + + //EXECUTE LOGIN // Data datei = new Data("users.txt"); // ArrayList user = datei.readUser(); // From 1b735824696fd23a440bd99be3d5f0e87026d5b9 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sun, 18 Dec 2022 08:47:47 +0100 Subject: [PATCH 39/40] kommentare angepasst --- out/production/VPR_SCRIPT/Execute.class | Bin 1815 -> 1598 bytes out/production/VPR_SCRIPT/Menue.class | Bin 2058 -> 1912 bytes out/production/VPR_SCRIPT/User.class | Bin 1752 -> 1752 bytes src/Execute.java | 14 +++++++------- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/out/production/VPR_SCRIPT/Execute.class b/out/production/VPR_SCRIPT/Execute.class index 38c9f6487dfec6e1aafa35c65c87db44375f5f53..26680c8e84c95457ddb0709064fe6f84c10d5d32 100644 GIT binary patch delta 223 zcmXAjJ5Iwu7=*vgX0wWA0ZvMk3%JPvFfp$fLY`33yGhLzID)14999Y>3Lk)$+kj*- zj++_HH?zOCJgdXtyZNetgx4xKSnIhy{@BnIv777?da95b90Tc0X(~5z7k^@^Q=LlN z8ay}Bup4m8ozjqd9z_{HSk&u zfq`g39g5!6vB6~|SOZW%A(A{-q94_objZmG(6P$XjIo9_taD0X1DmmSRJ#{W^sLzh zshWa{e$=srA`^iS+bHoiaE>x|=;*~6D%j=LDtVdOW%kI_qVeRgZ(tt>GMn$xA^Y`A weff$?3=9l53}G9&_A*bt&uqu%$;IHs;LXn9!^2?C;5%8HJuxD@p(k_#W*+V$pfubG^Y7Fj^FR+WM ix&pff$?3=9l53=tc-_A-mHr>B;$kAl~Go%np3sTns)8 zzU&NsJPhUx{*#4SjxYvJzQH2H62i!!I@z8@m6@F(Y_bAtDkIzEHda?jNd^`MDF#jk zX$C$983thnSq4c4IR<$K`N>aMJL;7g?10wtFfam1Rt9?p2O!PJ;KHB@ByE6feIN~% z)7rwoy8$S`#9#{~*}#J8ST(z1)hvLnSsSEzav@u=tUiMTg8|Te#z@8~K;7at`5{|~ xvo+9#HVkSE)<`PUp(>ae+`-QBVDJRe96*P80dW9B5Rk_OWCb&XGK4co0sx&uFG~Ob diff --git a/out/production/VPR_SCRIPT/User.class b/out/production/VPR_SCRIPT/User.class index 59687080a53d314799d10243f4c8c42570f8ffeb..cffb6de048d26c16c0cda1624035b4621eeadb01 100644 GIT binary patch delta 83 zcmcb?dxLkwZx&f;1{MYx22KW920jKk24Mzy21y15AgRcp%Ahn^g0+HCXYxc=8%A>= eDLVNvt2(0-n5Dp`&gctf#j-gtMoyl`W(5GGauL=5 delta 83 zcmcb?dxLkwZx&fe1{MY>22KWP20jKE24MzS21y1v26-S Date: Sun, 18 Dec 2022 11:48:51 +0100 Subject: [PATCH 40/40] txt angepasst --- menue.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menue.txt b/menue.txt index 1d96367..95a3b64 100644 --- a/menue.txt +++ b/menue.txt @@ -1,5 +1,5 @@ 12.12.2022;Veganes Schnitzel;mit Kroketten und Gemüse;Vegan;x;;;;;;x;;;;x;;;;;;;x;;;;;x -12.12.2022;Waffel;mit Puderzucker;Dessert V;;;x;;x;;;;;x;;;;;;;x;;;;;;x +12.12.2022;Vegane Waffel;mit Puderzucker;Dessert V;;;x;;x;;;;;x;;;;;;;x;;;;;;x 12.12.2022;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch;;;x;;;;;x;;;x;;;;;;;;x;;;;x 12.12.2022;Wackelpudding;mit Vanillesoße;Dessert;;;x;;;;;x;;;;;;;;x;;;;;x;;x 13.12.2022;Rote Linsen Curry;mit Süßkartoffeln;Vegan;;;x;;;;;;;;x;;;;;;x;;;;;;x