コード例 #1
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(potato);
            bowl.Add(carrot);

            return(bowl);
        }
コード例 #2
0
ファイル: Chef.cs プロジェクト: de3ka/TelerikAcademy
        public void Cook()
        {
            var potato = this.GetPotato();
            var carrot = this.GetCarrot();

            var peeledPotato = this.Peel(potato);
            var peeledCarrot = this.Peel(carrot);

            var cuttedPotato = this.Cut(potato);
            var cuttedCarrot = this.Cut(carrot);

            Bowl bowl = this.GetBowl();

            var bowlwithVegetables = bowl.Add(cuttedPotato);

            bowlwithVegetables.Add(cuttedCarrot);

            var oven = new Oven();

            var coockedMeal = oven.Cook(bowlwithVegetables);
        }
コード例 #3
0
ファイル: Chef.cs プロジェクト: de3ka/TelerikAcademy
        private Bowl GetBowl()
        {
            Bowl bowl = new Bowl();

            return(bowl);
        }