コード例 #1
0
 static void Main()
 {
     Chef test = new Chef("Some Guy");
     Carrot carrot = new Carrot();
     Potato potato = new Potato();
     test.PrepareVegetable(carrot);
     test.PrepareVegetable(potato);
     test.Cook(potato, carrot);
 }
コード例 #2
0
        static void Main()
        {
            Chef chef = new Chef();

            {
                Potato potato = new Potato();

                if (potato == null)
                {
                    throw new ArgumentException();
                }

                if (potato.IsPeeled && !potato.IsRotten)
                {
                    chef.CookByProducts(potato);
                }
            }

            // ....
        }
コード例 #3
0
        static void Main()
        {
            Chef chef = new Chef();

            {
                Potato potato = new Potato();

                if (potato == null)
                {
                    throw new ArgumentException();
                }
                
                if (potato.IsPeeled && !potato.IsRotten)
                {
                    chef.CookByProducts(potato);
                }
            }

            // ....
        }
コード例 #4
0
        public static void Main()
        {
            // TASK 2

            IPotato potato = new Potato();
            Chef    chef   = new Chef();

            if (potato != null)
            {
                if (!potato.IsRotten && potato.IsPeeled)
                {
                    chef.Cook(potato);
                }
            }

            // -----

            if (IsInColRange() && IsInRowRange() && !IsVisited())
            {
                VisitCell();
            }
        }
コード例 #5
0
        public static void Main()
        {
            var chef = new Chef("Andre Tokev");

            chef.Cook();
        }
コード例 #6
0
ファイル: CookingStart.cs プロジェクト: studware/Ange-Git
 static void Main(string[] args)
 {
     var chef = new Chef();
     var bowl = chef.Cook();
     Console.WriteLine("Ingredients prepared in the cooking bowl:\n{0}", bowl);
 }