using DependencyInjections; List listOfPayment = new List() { new PayPalPayment(), new CreditCardPayment() }; foreach (var paymentMethod in listOfPayment) { paymentMethod.ProcessPayment(10); } List listOfPrint = new List() { new PrintInvoice(), new PrintLetter(), new PrintReport() }; foreach (var printMethod in listOfPrint) { printMethod.Print(); } List driveables = new List() { new Car("Mercedes"), new Motorcycle("Harley Davidson") }; foreach (var driveable in driveables) { driveable.Start(); } List makeSounds = new List() { new Cat(), new Dog(), new Cow() }; foreach (var animal in makeSounds) { animal.MakeSound(); } List weapons = new List() { new Staff(), new Bow(), new Sword() }; foreach (var weapon in weapons) { Console.WriteLine(weapon.Attack()); }