Пример #1
0
        public void Cook(Vegetable vegetable)
        {
            Potato potato = new Potato();
            potato.Peel();
            potato.Cut();

            Carrot carrot = new Carrot();
            carrot.Peel();
            carrot.Cut();

            Bowl bowl = new Bowl();
            bowl.Add(potato);
            bowl.Add(carrot);
        }
Пример #2
0
        public void Cook()
        {
            Potato potato = GetPotato();
            Carrot carrot = GetCarrot();
            Bowl   bowl   = GetBowl();

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

            Cut(potato);
            Cut(carrot);

            bowl.Add(carrot);
            bowl.Add(potato);
        }
Пример #3
0
        public void CookTest()
        {
            // Base code refactored functionally goes below
            Potato potato = new Potato();
            Carrot carrot = new Carrot();
            Bowl bowl = new Bowl();

            potato.Peel();
            carrot.Peel();
            potato.Cut();
            carrot.Cut();

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

            // task2 - Potato COOKING! - included in the base code
            this.Cook(bowl.Ingredients);
        }
Пример #4
0
        public void CookTest()
        {
            // Base code refactored functionally goes below
            Potato potato = new Potato();
            Carrot carrot = new Carrot();
            Bowl   bowl   = new Bowl();

            potato.Peel();
            carrot.Peel();
            potato.Cut();
            carrot.Cut();

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

            // task2 - Potato COOKING! - included in the base code
            this.Cook(bowl.Ingredients);
        }