Where:
• addSong(Song song): void - add a new song
Song List
+addSong(Song song): void
to the SongList
getSongMaxDuration():Song return the
+getSongMaxDuration (): Song
song with the longest duration.
+printSongList(): void
printSongList(): void - prints a list of songs in ascending order by name
Hints: to declare the SongList class, you can use the following statement:public class SongList extends TreeSet <Song>
{
1/....
}
The program output might look something like this (using the SongList class):
Zoom
+ 100%
Close