Music class [10pts]
This is an abstract subclass of Media that represents different types of music. It overrides the constructor, and tostring() and provides an implementation for the compareTo().
• artist: A string with the name of the artist. Should have a getter (final) but no setter. .
• title: A string with the title of the piece. Should have a getter (final) but no setter. year: An integer representing the year the piece was released. Should have a getter (final) but no setter. .
• Music(format, isbn, genre, artist, title, year): A constructor which sets the private data members. Should call the parent class constructor. .toString(): A string representation of this object. Has the form "Artist: artist, Year: year, Title: title, "followed by the information given in the format of the
• toString() method of the parent class. Consider how inheritance can enable code reuse in this method.
• compareToo...): This method returns an integer value representing whether the instance given as an argument should be ordered before or after the calling instance. Negative numbers indicate the calling instance (this) should be ordered first. Positive numbers indicate the argument should be ordered first. Zero indicates that both instances have the same ordering. This method is what's used to sort collections in the collections framework. See the description of the sort() method in the Medialibrary class for how this method should be implemented.