Practice Test Geeks home

Swift Case Studies & Practical Application 3

You're designing an API for a payment processor.
Multiple concrete types (`CreditCard`, `PayPal`, `ApplePay`) must all be usable wherever a `PaymentMethod` is expected.

Which Swift mechanism is most appropriate?

Select your answer