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

            paymentMethod.pay(amount);
        }