コード例 #1
0
 public SmallSize(DrinkBase drinkBase)
 {
     _drinkBase  = drinkBase;
     description = _drinkBase.GetDescription() + "+small size";
 }
コード例 #2
0
 public BigSize(DrinkBase drinkBase)
 {
     _drinkBase  = drinkBase;
     description = _drinkBase.GetDescription() + "+big size";
 }
コード例 #3
0
 static void PrintDrink(DrinkBase drinkBase)
 {
     Console.WriteLine($"Drink:{drinkBase.GetDescription()} Price:{drinkBase.GetCost()}");
 }
コード例 #4
0
 public MilkIngredient(DrinkBase drinkBase)
 {
     _drinkBase  = drinkBase;
     description = _drinkBase.GetDescription() + "+milk";
 }
コード例 #5
0
 public SugarIngredient(DrinkBase drinkBase)
 {
     _drinkBase  = drinkBase;
     description = _drinkBase.GetDescription() + "+sugar";
 }
コード例 #6
0
 public ChocolateIngredient(DrinkBase drinkBase)
 {
     _drinkBase  = drinkBase;
     description = _drinkBase.GetDescription() + "+chocolate";
 }