public void executeStrategy()
 {
     PaymentStrategy.pay();
 }
 public void pay(IPaymentStrategy paymentMethod)
 {
     paymentMethod.pay(calculateTotal());
 }
예제 #3
0
        public void pay(IPaymentStrategy paymentMethod)
        {
            int amount = calcTotal();

            paymentMethod.pay(amount);
        }