public void Cook(params Vegetable[] vegetables) { Bowl bowl = GetBowl(); foreach (Vegetable vegetable in vegetables) { bowl.Add(vegetable); } }
public void Cook() { Potato potato = this.GetPotato(); Carrot carrot = this.GetCarrot(); Peel(potato); Peel(carrot); this.Cut(potato); this.Cut(carrot); Bowl bowl = this.GetBowl(); bowl.Add(carrot); bowl.Add(potato); }
public void Cook() { Bowl bowl = GetBowl(); Potato potato = GetPotato(); Peel(potato); Cut(potato); bowl.Add(potato); Carrot carrot = GetCarrot(); Peel(carrot); Cut(carrot); bowl.Add(carrot); }
public Bowl Cook() { Potato potato = GetPotato(); Peel(potato); Cut(potato); Carrot carrot = GetCarrot(); Peel(carrot); Cut(carrot); Bowl bowl = GetBowl(); bowl.Add(carrot); bowl.Add(potato); return(bowl); }
static void Main(string[] args) { IVegetable carrot = new Carrot(); IVegetable patato = new Patato(); IVegetable paper = new Paper(); IVegetable vegetables = new Vegetables(); IAppearance bowl = new Bowl(); IAppearance steamer = new Steamer(); Chef chef = new Chef(); chef.Wash(); chef.Cut(); chef.Prepare(bowl); chef.Cook(steamer); chef.Serve(); }
private Bowl GetBowl() { var bowl = new Bowl(); return bowl; }