Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 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;
 }