Beispiel #1
0
        public void Cook()
        {
            Bowl   bowl   = this.GetBowl();
            Potato potato = this.GetPotato();
            Carrot carrot = this.GetCarrot();

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

            this.Cut(potato);
            this.Cut(carrot);

            bowl.Add(carrot);
            bowl.Add(potato);
        }
Beispiel #2
0
        public static void Main()
        {
            Cook   cook   = new Cook();
            Potato potato = new Potato();
            Carrot carrot = new Carrot();
            Bowl   bowl   = new Bowl();

            cook.PeelVegetables(carrot);
            cook.PeelVegetables(potato);
            cook.CutVegetables(carrot);
            cook.CutVegetables(potato);

            bowl.Add(carrot);
            bowl.Add(potato);
        }
Beispiel #3
0
        public void Cook()
        {
            Bowl bowl = GetBowl();

            Potato potato       = GetPotato();
            Potato peeledPotato = Peel(potato);
            Potato cutPotato    = Cut(peeledPotato);

            bowl.Add(cutPotato);

            Carrot carrot       = GetCarrot();
            Carrot peeledCarrot = Peel(carrot);
            Carrot cutCarrot    = Cut(peeledCarrot);

            bowl.Add(cutCarrot);
        }
Beispiel #4
0
        public void Cook(Vegetable vegetable)
        {
            Potato potato = GetPotato();
            Carrot carrot = GetCarrot();
            Bowl   bowl;

            Peel(potato);
            Peel(carrot);

            bowl = GetBowl();

            Cut(potato);
            Cut(carrot);

            bowl.Add(carrot);
            bowl.Add(potato);
        }
Beispiel #5
0
        private Carrot GetCarrot()
        {
            Carrot carrot = new Carrot();

            return(carrot);
        }
Beispiel #6
0
 private Carrot GetCarrot()
 {
     Carrot carrot = new Carrot();
     return carrot;
 }