
// Alter the following javadoc to meet our standard header

/** This program creates a list of songs for a CD by 
    reading from a file
*/
   import java.io.*;
   import java.util.Scanner;

/** This program creates a list of songs for a CD by 
    reading from a file
*/

 public class CompactDisc
{
// what goes here?
    public static void main(String [] args) throws IOException
   {
      File file;
      Scanner input;
       
      String title;
      String artist;
   
   // PART 2 declare two song objects here cd and cd2
      
   // instantiate file objects
      file = new File("Classics.txt");
      input = new Scanner(file);
   
   // PART 2 - Instantiate cd to size 6
   
   // create the array by reading the information from the file
   // and storing it in the appropriate location
      for (int i = 0; i < cd.length; i++)
      {
         title = input.nextLine();
         artist = input.nextLine(); 
      
      // PART 2 write the code to fill the array by creating a new song with 
      // the title and artist and storing it in the 
      // appropriate position in the array
      
      }
   
      System.out.println("Contents of Classics:");
   
   
   	// first print a label for the following data 
      System.out.println("\nUnsorted original array");
   	
   	// PART 2 - use a foreach loop to print each element of the array
   	 
   				
   
   	// PART 3 - Add code to "deep copy" the cd array to cd2.
   	
		
   	// label this output			
      System.out.println("\nUnsorted copy");
   	
   	// PART 3 using a for each loop print the array copy (cd2) to the console
   			
   
   
   	// PART 4 - Call the sort method, using the cd array.
   
   
   	// first print the label
      System.out.println("Sorted original array");
   	
   	// PART 4 - Using a for each loop print the sorted array
   	
   	// PART 5 - Use the Array.sort method to sort your cd2 array.
   
		// Print the sorted array
		// First print the label
 		System.out.println("Sorted copy");  
	
   	// PART 5 - Print the sorted array as you did for part 3 above.
   }
}