File MoreTunes.java contains most of a driver to test your program. Fill in the missing code and run the program. You'll notice that both the original and the new collection are called My CD Collection, which is a little misleading. To fix this, add a new constructor to the CDCollection class that takes a title for the collection, and store the title in an instance variable. Then in the toString method of CDCollection, use the title of the collection if one exists; if there is no title (i.e., if the original constructor was used), just say "My CD Collection" as before. Note that your findAll method should use the constructor that takes a title, passing the artists name. A run of your program might look like this:
[bloss@riddler lab1]$ java MoreTunes &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& My CD Collection Number of CDs: 8 Total cost: $137.67 Average cost: $17.21 CD List: $14.95 10 Storm Front Billy Joel $14.95 16 Come On Over Shania Twain $17.95 33 Soundtrack Les Miserables $13.90 11 Graceland Paul Simon $19.99 26 Double Live Garth Brooks $15.95 13 Greatest Hits Jimmy Buffet $19.99 26 Garth II Garth Brooks $19.99 26 Garth III Garth Brooks Enter artist to search for: Garth Brooks &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& My Garth Brooks CD Collection Number of CDs: 3 Total cost: $59.97 Average cost: $19.99 CD List: $19.99 26 Double Live Garth Brooks $19.99 26 Garth II Garth Brooks $19.99 26 Garth III Garth Brooks