Klasse Menue erstellt (in bearbertung)

This commit is contained in:
Madeleine Vigier 2022-12-14 20:53:16 +01:00
parent a8e080d232
commit e166254bff
2 changed files with 209 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import java.util.Scanner;
public class Execute { public class Execute {
public static void main(String[] args) { public static void main(String[] args) {
Data datei = new Data("users.txt"); Data datei = new Data("users.txt");
ArrayList<User> user = datei.readData(); ArrayList<User> user = datei.readUser();
for (User user1 : user) { for (User user1 : user) {
System.out.println(user1); System.out.println(user1);

208
src/Menue.java Normal file
View File

@ -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 +
'}';
}
}