Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
739e973cf7
@ -24,7 +24,6 @@ public class Data {
|
||||
*
|
||||
* @return Arraylist userList
|
||||
* @author Madeleine Vigier, Sabine Gubitz
|
||||
* @version 1.3
|
||||
*/
|
||||
public ArrayList<User> readUser() {
|
||||
List<String> rows = getRows();
|
||||
@ -51,12 +50,11 @@ public class Data {
|
||||
*
|
||||
* @return Arraylist menuelist
|
||||
* @author Madeleine Vigier, Sabine Gubitz
|
||||
* @version 1.3
|
||||
*/
|
||||
public ArrayList<Menue> readMenue() {
|
||||
public ArrayList<Menu> readMenu() {
|
||||
|
||||
List<String> rows = getRows();
|
||||
ArrayList<Menue> menueList = new ArrayList<>();
|
||||
ArrayList<Menu> 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<Order> readOrder() {
|
||||
|
||||
@ -223,7 +220,6 @@ public class Data {
|
||||
*
|
||||
* @return ArrayList rows
|
||||
* @author Madeleine Vigier
|
||||
* @version 1.0
|
||||
*/
|
||||
private List<String> getRows() {
|
||||
Path path = Paths.get(pathRead);
|
||||
|
@ -8,17 +8,17 @@ public class Execute {
|
||||
public static void main(String[] args) {
|
||||
//EXECUTE MENUE OVERVIEW
|
||||
Data data = new Data("menue.txt");
|
||||
ArrayList<Menue> menue = data.readMenue();
|
||||
ArrayList<Menu> 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"
|
||||
|
@ -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) {
|
||||
|
@ -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<String> ingredients) {
|
||||
public Menu(String date, String dish, String sideDish, String typ, List<String> 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() {
|
@ -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 + '\'' +
|
||||
'}';
|
||||
|
Loading…
Reference in New Issue
Block a user