public void Cook(Bowl bowl, Vegetable[] vegetables) { foreach (var vegetable in vegetables) { this.Peel(vegetable); this.Cut(vegetable); bowl.Add(vegetable); } }
private void Cut(Vegetable vegetable) { // ... }
private void Peel(Vegetable vegetable) { // ... }
public void Add(Vegetable vegetable) { // throw overvegetable Exception // more code }