예제 #1
0
 public Bestelling(int bestelnr, Klant klant, Drank drank, int aantal = 1)
 {
     BestelNr = bestelnr;
     Klant    = klant;
     Drank    = drank;
     Aantal   = aantal;
 }
예제 #2
0
 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;
 }
예제 #3
0
 public string ShowDrank()
 {
     if (Drank != null)
     {
         if (Drank.GetType() == typeof(Frisdrank))
         {
             return("F" + "-" + Drank.Naam);
         }
         else
         {
             return("W" + "-" + Drank.Naam);
         }
     }
     else
     {
         return("");
     }
 }
예제 #4
0
 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();
 }