// The user will set the PaymentStrategy by // calling this method at runtime public void SetPaymentStrategy(IPaymentStrategy strategy) { this.PaymentStrategy = strategy; }
public void CheckOut(IPaymentStrategy paymentMethod) { Display(); paymentMethod.Pay(_totalAmount); GoodsList.Clear(); }
public void SetPaymentStrategy(IPaymentStrategy paymentStrategy) { this.paymentStrategy = paymentStrategy; }