Swift Practice Test

Swift Case Studies & Practical Application 3

Free · Instant Results

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?
▶ Start Practice Test