Exemplo n.º 1
0
        public static void Main()
        {
            Chef cooker = new Chef();
            Potato potato = new Potato();

            if (potato != null && potato.IsPeeled && potato.IsRotten)
            {
                cooker.Cook(potato);
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            IVegetable carrot = new Carrot();
            IVegetable patato = new Patato();
            IVegetable paper  = new Paper();

            IVegetable vegetables = new Vegetables();

            IAppearance bowl    = new Bowl();
            IAppearance steamer = new Steamer();

            Chef chef = new Chef();

            chef.Wash();
            chef.Cut();
            chef.Prepare(bowl);
            chef.Cook(steamer);
            chef.Serve();
        }
Exemplo n.º 3
0
        /// <summary>
        /// The entry point of the application.
        /// </summary>
        public static void Main()
        {
            Chef gordonRamsey = new Chef();

            Vegetable potato = new Potato(true);
            Vegetable carrot = new Carrot(true, false, false);

            gordonRamsey.Peel(potato);
            gordonRamsey.Peel(carrot);

            gordonRamsey.Cut(carrot);

            gordonRamsey.PutInBowl(potato);
            gordonRamsey.PutInBowl(carrot);

            foreach (Vegetable vegetable in gordonRamsey.VegitablesInBowl)
            {
                Console.WriteLine(vegetable.ToString());
                Console.WriteLine();
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// The entry point of the application.
        /// </summary>
        public static void Main()
        {
            Chef gordonRamsey = new Chef();

            Vegetable potato = new Potato(true);
            Vegetable carrot = new Carrot(true, false, false);

            gordonRamsey.Peel(potato);
            gordonRamsey.Peel(carrot);

            gordonRamsey.Cut(carrot);

            gordonRamsey.PutInBowl(potato);
            gordonRamsey.PutInBowl(carrot);

            foreach (Vegetable vegetable in gordonRamsey.VegitablesInBowl)
            {
                Console.WriteLine(vegetable.ToString());
                Console.WriteLine();
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// The entry point of the application.
        /// </summary>
        public static void Main()
        {
            Chef cook = new Chef();

            Vegetable potato = new Potato(true, false, false);

            if (potato != null && potato.IsFresh)
            {
                if (!potato.IsPeeled)
                {
                    cook.Peel(potato);
                }

                cook.Cut(potato);

                cook.PutInBowl(potato);
            }

            foreach (Vegetable vegetable in cook.VegitablesInBowl)
            {
                Console.WriteLine(vegetable.ToString());
                Console.WriteLine("--------------------------------------------------");
            }
        }
Exemplo n.º 6
0
 public static void Main()
 {
     var chef = new Chef();
     var bowl = chef.Cook();
 }
Exemplo n.º 7
0
 static void Main()
 {
     var chef = new Chef();
     chef.Cook();
 }
Exemplo n.º 8
0
 public static void Main()
 {
     var chef = new Chef();
     var bowl = chef.Cook();
 }