예제 #1
0
 public override void SetPrice(Cheese cheese, DateTime currentDate)
 {
     if (Utils.DaysRemainingBeforeExpiration(cheese, currentDate) > 10)
     {
         cheese.Price = PriceCalculator.ApplyDiscount(cheese, currentDate);
     }
     else if (Utils.DaysRemainingBeforeExpiration(cheese, currentDate) <= 5)
     {
         cheese.Price = PriceCalculator.ApplyAddition(cheese, currentDate);
     }
     else
     {
         cheese.Price = PriceCalculator.ApplyAddition(cheese, currentDate);
     }
 }
예제 #2
0
 public override void SetPrice(Cheese cheese, DateTime currentDate)
 {
     cheese.Price = PriceCalculator.ApplyAddition(cheese, currentDate);
 }