public Bestelling(int bestelnr, Klant klant, Drank drank, int aantal = 1) { BestelNr = bestelnr; Klant = klant; Drank = drank; Aantal = aantal; }
public Bestelling(int bestelnr, Klant klant, Gerecht gerecht, Drank drank, Dessert dessert, int aantal = 1) { BestelNr = bestelnr; Klant = klant; Gerecht = gerecht; Drank = drank; Dessert = dessert; Aantal = aantal; }
public string ShowDrank() { if (Drank != null) { if (Drank.GetType() == typeof(Frisdrank)) { return("F" + "-" + Drank.Naam); } else { return("W" + "-" + Drank.Naam); } } else { return(""); } }
public void ToonDetails() { Console.WriteLine($"Klant: {Klant.ToString()}"); if (Gerecht != null) { Console.WriteLine($"Gerecht: {Gerecht.ToString()}"); } if (Drank != null) { Console.WriteLine($"Drank: {Drank.ToString()}"); } if (Dessert != null) { Console.WriteLine($"Dessert: {Dessert.ToString()}"); } Console.WriteLine($"Aantal: {Aantal}"); Console.WriteLine(ToString()); Console.WriteLine(); }