Cut() private method

private Cut ( Organism organism ) : void
organism Organism
return void
コード例 #1
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("--------------------------------------------------");
            }
        }