Question: writestubsfor each class so that your code compiles. Java code please Song.java This class collects methods/data for a song, public Song(String title, String artist) -
writestubsfor each class so that your code compiles.
Java code please
Song.java This class collects methods/data for a song, public Song(String title, String artist) - construct a new instance of the Song class with the specified song title and artist. public String getTitle() - return the title of the song. public String getArtist() - return the artist of the song. public int getTimes Played() - return the number of times this song has been played. public void play() - "play" this song. To play a song you just print out a description of the song public String toString() - return a string description of this song. It should be of the format: title by artist, timesPlayed play($). So if you have the song God's Plan by Drake and it has been played 27 times, it should return "God's Plan by Drake, 27 play(s)" Library.java This class must keep track of the library of songs in your Spotify program. This comes from the file in songFiles. That filename is passed in as a command-line argument. public Library() - constructs a new instance of this class. public Song getSong(String title) - returns the Song associated with the String title passed in if it exists in the library, or null if the song does not exist in the library. public List
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
