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);
        }