public Bowl Cook(Vegetable vegetable) { Bowl bowl = this.GetBowl(); bowl.Add(vegetable); return bowl; }
public static void CookVegitable(Vegetable vegitable, Chef chef) { Potato potato = new Potato(); bool isCookable = IsCookable(potato); if (isCookable) { chef.Cook(potato); } else { throw new ArgumentException("The Vegitable be not rotten and peeled!"); } }
private static bool IsCookable(Vegetable vegitable) { bool canBeCooked = vegitable != null && !vegitable.IsRotten && vegitable.IsPeeled; return canBeCooked; }
private void Peel(Vegetable vegetable) { Thread.Sleep(2000); Console.WriteLine("Vegetable is peeled!", vegetable.GetType()); }
private void Cut(Vegetable vegetable) { Thread.Sleep(2000); Console.WriteLine("Vegetable is cut!"); }
public void Add(Vegetable vegitable) { throw new NotImplementedException(); }
public void AddVegetable(Vegetable vegetable) { this.Vegetables.Add(vegetable); }
private void Cut(Vegetable potato) { throw new NotImplementedException(); }
private void Cut(Vegetable vegetable) { }
private void Peel(Vegetable vegetable) { throw new NotImplementedException(); }
internal void Add(Vegetable vegetable) { throw new NotImplementedException(); }
private void Peel(Vegetable vegitable) { vegitable.IsPeeled = true; }
private void Cut(Vegetable vegitable) { vegitable.IsCutted = true; }