Interface segregation: payment methods

Give each client an interface with only the methods it calls, so no implementation has to fake the rest.

Level Intermediate

What you will see

  1. Four jobs, one interface
  2. Methods nobody calls
  3. One interface per client
  4. One class, several roles
  5. How small is too small

Before / after

Base: interface-segregation-base-tsView the diff

Exercises