Kommentare angepasst

This commit is contained in:
Madeleine Vigier 2022-12-18 07:49:06 +01:00
parent 922345077b
commit 6d690410ec
2 changed files with 41 additions and 22 deletions

View File

@ -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<String> 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";
}
}

View File

@ -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