コード例 #1
0
        public static void Main()
        {
            Chef someChef = new Chef();
            Bowl newBowl  = someChef.Cook();

            Console.WriteLine(newBowl);
        }
コード例 #2
0
ファイル: Chef.cs プロジェクト: IlianaVachkova/CSharp
        public void Cook()
        {
            Bowl bowl = GetBowl();

            Potato potato = GetPotato();

            Peel(potato);
            Cut(potato);
            bowl.Add(potato);

            Carrot carrot = GetCarrot();

            Peel(carrot);
            Cut(carrot);
            bowl.Add(carrot);
        }
コード例 #3
0
        public Bowl Cook()
        {
            Potato potato = this.GetPotato();

            this.Peel(potato);
            this.Cut(potato);

            Carrot carrot = this.GetCarrot();

            this.Peel(carrot);
            this.Cut(carrot);

            Bowl bowl = this.GetBowl();

            bowl.Add(carrot);
            bowl.Add(potato);

            return(bowl);
        }