Esempio n. 1
0
 public void makePayment(PaymentStrategy payment)
 {
     Payments.Add(payment);
     payment.pay();
 }
Esempio n. 2
0
        public void pay(PaymentStrategy paymentMethod)
        {
            int amount = calculateTotal();

            paymentMethod.pay(amount);
        }