diff --git a/src/Data.java b/src/Data.java index 68a00ed..93156ed 100644 --- a/src/Data.java +++ b/src/Data.java @@ -24,7 +24,6 @@ public class Data { * * @return Arraylist userList * @author Madeleine Vigier, Sabine Gubitz - * @version 1.3 */ public ArrayList readUser() { List rows = getRows(); @@ -51,12 +50,11 @@ public class Data { * * @return Arraylist menuelist * @author Madeleine Vigier, Sabine Gubitz - * @version 1.3 */ - public ArrayList readMenue() { + public ArrayList readMenu() { List rows = getRows(); - ArrayList menueList = new ArrayList<>(); + ArrayList menuList = new ArrayList<>(); for (String row : rows) { @@ -165,9 +163,9 @@ public class Data { } String end = parts[26]; //endpoint - menueList.add(new Menue(date, dish, sideDish, typ, ingredients)); + menuList.add(new Menu(date, dish, sideDish, typ, ingredients)); } - return menueList; + return menuList; } @@ -176,7 +174,6 @@ public class Data { * * @return Arraylist orderlist * @author Madeleine Vigier, Sabine Gubitz - * @version 1.2 */ public ArrayList readOrder() { @@ -223,7 +220,6 @@ public class Data { * * @return ArrayList rows * @author Madeleine Vigier - * @version 1.0 */ private List getRows() { Path path = Paths.get(pathRead); diff --git a/src/Execute.java b/src/Execute.java index 215a48b..7943e86 100644 --- a/src/Execute.java +++ b/src/Execute.java @@ -8,17 +8,17 @@ public class Execute { public static void main(String[] args) { //EXECUTE MENUE OVERVIEW Data data = new Data("menue.txt"); - ArrayList menue = data.readMenue(); + ArrayList menu = data.readMenu(); - for (int i = 0; i < menue.size(); i++) { + for (int i = 0; i < menu.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(GeneralMethods.getDayNumberNew(menu.get(i).getDate())); + System.out.println(menu.get(i).getDate()); System.out.println(); } - System.out.println(menue.get(i)); + System.out.println(menu.get(i)); } System.out.println("a: Eier; b: Soja, c: Milch; d: Erdnüsse; e: Weichtiere; f: Krebstiere; g: Getreide; h: Senf\n" diff --git a/src/GeneralMethods.java b/src/GeneralMethods.java index 9dda686..e576d1f 100644 --- a/src/GeneralMethods.java +++ b/src/GeneralMethods.java @@ -14,8 +14,8 @@ import java.util.Locale; /** * GeneralMethods is a class for commen public methods. * - * @version 1.0 - * @auhtor Felix Wöstemeyer + * @author Felix Wöstemeyer + * @version 1.4 */ public class GeneralMethods { @@ -24,7 +24,6 @@ public class GeneralMethods { * * @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 String getDayNumberNew(String dateString) { @@ -42,7 +41,6 @@ public class GeneralMethods { * * @param dayNumber dayNumber e.g. 1 for Monday * @return weekday - * @version 1.0 * @author Madeleine Vigier */ public static String getDayName(int dayNumber) { diff --git a/src/Menue.java b/src/Menu.java similarity index 83% rename from src/Menue.java rename to src/Menu.java index 1df6d0f..71ac4f6 100644 --- a/src/Menue.java +++ b/src/Menu.java @@ -1,12 +1,12 @@ import java.util.List; /** - * Menue is a class to built a menue + * Menu is a class to built a menu * - * @author: Madeleine Vigier - * @version: 1.0 + * @author Madeleine Vigier + * @version 1.1 */ -public class Menue { +public class Menu { String date; String dish; String sideDish; @@ -23,7 +23,7 @@ public class Menue { * @param typ vegan, vegetarian or meat * @param ingredients list of ingredients */ - public Menue(String date, String dish, String sideDish, String typ, List ingredients) { + public Menu(String date, String dish, String sideDish, String typ, List ingredients) { this.date = date; this.dish = dish; this.sideDish = sideDish; @@ -36,7 +36,6 @@ public class Menue { * * @return date * @author Madeleine Vigier - * @version 1.0 */ public String getDate() { return date; @@ -47,7 +46,6 @@ public class Menue { * * @return typ e.g. Vegan * @author Madeleine Vigier - * @version 1.0 */ public String getTyp() { if (typ.contains("DessertV") || typ.contains("Dessert")) { @@ -62,9 +60,8 @@ 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 + * @return a String with dish, sideDish, list of ingredients and the typ of the menu * @author Madeleine Vigier - * @version 1.0 */ @Override public String toString() { diff --git a/src/User.java b/src/User.java index e9e4e98..a569f70 100644 --- a/src/User.java +++ b/src/User.java @@ -2,33 +2,32 @@ * User class creates User Objects * * @author Madeleine Vigier - * @version 1.1 + * @version 1.2 */ public class User { private String nameParent1; private String nameParent2; private String billAddress; - private String phonenumber; + private String phoneNumber; private String nameChildren; private String password; /** * constructor * - * @param nameParent1 - * @param nameParent2 - * @param billAddress - * @param phonenumber - * @param nameChildren - * @param password + * @param nameParent1 name of the first parent of the child + * @param nameParent2 name of the second parent of the child + * @param billAddress the address the bill should be sent to + * @param phoneNumber phonenumber of one of the parents and also the username + * @param nameChildren name of the child + * @param password password of the user * @author Madeleine Vigier - * @version 1.0 */ - public User(String nameParent1, String nameParent2, String billAddress, String phonenumber, String nameChildren, String password) { + public User(String nameParent1, String nameParent2, String billAddress, String phoneNumber, String nameChildren, String password) { this.nameParent1 = nameParent1; this.nameParent2 = nameParent2; this.billAddress = billAddress; - this.phonenumber = phonenumber; + this.phoneNumber = phoneNumber; this.nameChildren = nameChildren; this.password = password; } @@ -38,10 +37,9 @@ public class User { * * @return Phonenumber * @author Madeleine Vigier - * @version 1.0 */ public String getPhonenumber() { - return phonenumber; + return phoneNumber; } /** @@ -49,7 +47,6 @@ public class User { * * @return password * @author Madeleine Vigier - * @version 1.0 */ public String getPassword() { return password; @@ -60,7 +57,6 @@ public class User { * * @return nameParent1 * @author Madeleine Vigier - * @version 1.0 */ public String getNameParent1() { return nameParent1; @@ -71,7 +67,6 @@ public class User { * * @return nameParent2 * @author Madeleine Vigier - * @version 1.0 */ public String getNameParent2() { return nameParent2; @@ -82,7 +77,6 @@ public class User { * * @return a String with nameParent1, nameparent2, billAdress, phonenumber, nameChildren, password * @author Madeleine Vigier - * @version 1.0 */ @Override public String toString() { @@ -90,7 +84,7 @@ public class User { "nameParent1='" + nameParent1 + '\'' + ", nameParent2='" + nameParent2 + '\'' + ", billAddress='" + billAddress + '\'' + - ", phonenumber='" + phonenumber + '\'' + + ", phonenumber='" + phoneNumber + '\'' + ", nameChildren='" + nameChildren + '\'' + ", password='" + password + '\'' + '}';