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