using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Strategy { internal class Checkout { public IPayment Payment { get; set; } public Checkout(IPayment payment) { Payment = payment; } public void Charge(int total) { Console.WriteLine($"Charging {total}"); this.Payment.Pay(total); } } }