Write the java class tunes that sorts the cd objects by


Assignment -

Write the java class Tunes that sorts the CD objects by title of CD class in lexicographic order and print the ordered cd objects by title to console.

Program Plan:

  • In CD.java class, implement the Comparable interface that allows to override the comapreTo method to sort by title.
  • In CDCollection.java class, write a method called sort that that uses collection of music and count as input arguments to sort by title.
  • In Tunes.java class, instantiate CDCollection class, and then add CD collection and call sort method to sort by alphabetical order and print sorted cd's to console.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write the java class tunes that sorts the cd objects by
Reference No:- TGS02894732

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)