Пример #1
0
        static void Main(string[] args)
        {
            Vegetables avocado  = new Vegetables("Avocados", 160, 100, 2, 14.66, 1.83);
            Vegetables cucumber = new Vegetables("Cucumbers", 15, 100, 0.7, 0.1, 3.0);
            Vegetables greens   = new Vegetables("Greens", 12, 100, 1.2, 0.3, 1.3);
            Vegetables spinach  = new Vegetables("Spinach", 17, 100, 2.7, 0.4, 0.8);
            Vegetables tomato   = new Vegetables("Tomatos", 19, 100, 0.8, 0.3, 3.5);
            Chef       salad    = new Chef(avocado, cucumber, greens, spinach, tomato);

            salad.Hierarchy();
            salad.MixSalat();
            salad.SumKkal();
            salad.SortProteins();
            salad.ShowList();
            salad.FindByCalories();
            Console.WriteLine();
            Console.ReadKey();
        }
Пример #2
0
 public void AddNode(Vegetables vegetables)
 {
     ListOfVegetables.Add(vegetables);
 }