public string Prepare(Drink drink) { string message = "We are preparing the following drink for you: Hot tea"; message += drink.HasMilk ? " with milk" : " without milk"; message += drink.HasSugar ? " with sugar" : " without sugar"; return message; }
public string Prepare(Drink drink) { string message = "We are preparing the following drink for you: Expresso"; message += " with chocolate topping"; message += drink.HasMilk ? " with milk" : " without milk"; message += drink.HasSugar ? " with sugar" : " without sugar"; return message; }
public string Prepare(Drink drink) { if (drink.HasMilk) { return "Cannot make ice tea with milk"; } string message = "We are preparing the following drink for you: Ice tea"; message += " without milk"; message += drink.HasSugar ? " with sugar" : " without sugar"; return message; }