Practice Interfaces

Practice Exercises:

  1. Create an interface VideoPlayer with a method playVideo(String videoName). Implement this interface for YouTube and Netflix.

  2. Extend the MusicPlayer interface to include a method stopSong. Update the SpotifyPlayer and AppleMusicPlayer classes to implement this new method.

  3. Create interface and classes as given in this link.

  4. Extend the previous exercise as given in this link.

  5. Create interfaces and classes as given in this link.

Back to Top

Back to Learn:

Go to Interfaces to learn more with examples.