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.