App
+ play(media)
LegacyAudio
+ startAudio(f)
Interfaces don't match
1interface MediaPlayer { void play(String f); }2class LegacyAudio { void startAudio(String f){ ... } }3// app.play(...) ✗ — LegacyAudio has no play()
Convert the interface a class HAS into the interface a client EXPECTS — a wrapper that translates calls so incompatible code can work together.
1interface MediaPlayer { void play(String f); }2class LegacyAudio { void startAudio(String f){ ... } }3// app.play(...) ✗ — LegacyAudio has no play()
Your App is written to call play(media) on a MediaPlayer. That's the interface the rest of your code speaks.