Royalties - a hashmap with the artists name as the keys and


Add the following attributes to the MusicExchangeCenter class:

Royalties - a HashMap with the artist's name as the keys and the values are floats representing the total amount of royalties for that artist so far. It should only contain artists who have had songs downloaded.

DownloadedSongs - an ArrayList containing all of the songs that have been downloaded. This list will, in general, contain duplicate Song objects.

Give method in the MusicExchangeCenter class called displayRoyalties() that displays the royalties for all artists who have had at least one of their songs downloaded. It should display a two-line header and then one line per artist showing the royalty amount as well as the artist name as follows:

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Royalties - a hashmap with the artists name as the keys and
Reference No:- TGS02700035

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)