public Ramen Serve() { var noodle = new Noodle("細麺", 150); var soup = new Soup("醤油スープ", 200); var toppings = new List <Topping>(); toppings.Add(new Topping("チャーシュー", 150)); toppings.Add(new Topping("メンマ", 100)); toppings.Add(new Topping("わかめ", 30)); toppings.Add(new Topping("のり", 50)); var ramen = new Ramen(noodle, soup, toppings); ramen.Name = Menu[OrderedMenu]; Console.WriteLine($"大変お待たせいたしました。{ramen.Name}ラーメンをお持ちしました。"); Console.WriteLine($"料金は{ramen.GetPrice()}円になります。"); return(ramen); }
public Ramen(Noodle noodle, Soup soup, List <Topping> toppings) { _noodle = noodle; _soup = soup; _toppings = toppings; }