Using the attached catalogtxt file create a program that


Java - Album - MESSAGE FOR SOLUTION

1.) Using the attached catalog.txt file, create a program that begins by loading the file onto an arraylist of Album classes called Catalog. Each Album class consists of 3 attributes: artist name, album name, and an arraylist of Track objects, each containing the name of a song on the album.

2.) Implement the Comparable interface for the Album and the Track classes, defining their own compareTo() methods.

3.) Sort the Album arraylist using Collections.sort(), and display the sorted Albums by album name. For each Album, display the album name, artist name, and display all the Tracks (i.e. songs) in alphabetical order (use the sort() method too)

4.) Add another sort of the Album arraylist, by artist name. To implement this sort, you will need a Comparator interface, and a Comparator class.

Save the results of this sort in a separate ArrayList from the one sorted by album name. Print a dividing line of asterisks, and then display all the Albums by artist name. For each Album, also display the album name, and all its tracks (songs) in alphabetical order. For more hints, see pg. 661 in CH. 14 of Big Java, 5th Edition.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Using the attached catalogtxt file create a program that
Reference No:- TGS02170771

Expected delivery within 24 Hours