The File MoreTunes.java contains portions of a simple driver to test your program. Fill in the missing code and run the program.
One "problem" you may notice when you run the program is that when you print out the Artist-based collection,it is still called 'My CD collection' - which is the same title as the main collection. To fix this, you should 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:
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 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