Beispiel #1
0
        public void Cook()
        {
            IPotato potato = GetPotato();
            ICarrot carrot = GetCarrot();

            Peel(potato);
            Peel(carrot);

            Cut(potato);
            Cut(carrot);

            IBowl bowl = GetBowl();

            bowl.Add(carrot);
            bowl.Add(potato);
        }
Beispiel #2
0
        public void Cook(IVegetable veggie)
        {
            if (veggie == null)
            {
                throw new ArgumentNullException();
            }

            Peel(veggie);
            Cut(veggie);

            IBowl bowl = GetBowl();

            bowl.Add(veggie);
        }