Question: Write a Java class called Song to represent a song in a music collection. The data members of the Song class are String objects representing

Write a Java class called Song to represent a

Write a Java class called Song to represent a song in a music collection. The data members of the Song class are String objects representing the song title, artist's name and the album where the song can be found. These instance variables for the class are to have private access modifiers so you will need to write the appropriate methods to allow the client to access the data values. In accordance with good programming practice you are to override the equals and toString methods. In addition, this class is going to be used in a Collection that is to be sorted, so it is to implement the comparable interface. A second class is to be written called SongList that contains a main method that reads in a file name via the command line. The file is a listing of the songs on one of my playlists. In the file each song is on a single line. The line is formatted with the song name, the artist name and the album separated by a colon.) and varying amounts of white space. Each playlist contains 70 songs. The program is to prompt the user to enter the name of an artist and provide a formatted list of all the songs by that artist that appear on the playlist, grouped by album and in alphabetical order by song title. If no songs by the given artist are on the playlist, an appropriate message is to be displayed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!