Question
create the class MP3Player such that the test class TestMP3Player produces the output in practice problem 4 in course_examples for week 4 part 2 Links
create the class MP3Player such that the test class TestMP3Player produces the output in practice problem 4 in course_examples for week 4 part 2Links to an external site.. DefineMP3Playersuch that it implements the interface Playable as specified in the practice problem.
public interface Playable { public static int MUTEVOLUME = 0; public void play(); public void stop(); }
public class MP3Player implements Playable { public MP3Player(String zune) { } public void charge() { } public void play() { } @Override public void stop() { } interface Playable { public default void MP3Player(String zune) { } }}
public class TestMP3Player { public static void main(String [] args) { MP3Player zune = new MP3Player("zune"); System.out.println(zune.toString()); zune.charge(); System.out.println(zune); zune.play(); } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started