public override string GetDescription()
        {
            if (beverage != null)
            {
                return(beverage.GetDescription());
            }

            return("Unknown Beverage");
        }
Exemple #2
0
 public override string GetDescription()
 {
     return(beverage.GetDescription() + ", Mocha");
 }
Exemple #3
0
 public override string GetDescription()
 {
     return($"{_beverage.GetDescription()}, Whip");
 }
 public override string GetDescription()
 {
     return(b.GetDescription() + " Cream");
 }
 public override string GetDescription()
 {
     return(b.GetDescription() + " with Addon like Caramel");
 }
 public Whip(Beverage beverage)
 {
     this.beverage = beverage;
     SetDescription(beverage.GetDescription() + ", Whip");
 }
 public SoyMilk(Beverage beverage)
 {
     this.beverage = beverage;
     SetDescription(beverage.GetDescription() + ", Soy Milk");
 }
 public Mocha(Beverage beverage)
 {
     this.beverage = beverage;
     SetDescription(beverage.GetDescription() + ", Mocha");
 }
 private static void TicketUpdate(Beverage b)
 {
     Console.WriteLine($"The current ticket shows: Description: {b.GetDescription()} \t \t \t Cost: {b.Cost()} \r\n");
 }
Exemple #10
0
 public override string GetDescription()
 {
     return(_beverage.GetDescription() + ", Steamed Milk");
 }
Exemple #11
0
 public override string GetDescription()
 {
     return(beverage.GetDescription() + ", Mocha");//我们想着描述不仅仅能描述饮料,而是连调料都可以描述。所以利用委托的做法,得到一个叙述,然后在后面加上其他的叙述。
 }
Exemple #12
0
 public override string GetDescription()
 {
     return(beverage.GetDescription() + ", Whip");
 }