   import java.io.*;
   import java.util.*;
/***********************************************
 * Read input through a file to determine the birthday or assignments
 * the user puts through
 * 
 *
 * @author - Vicente Rosa
 * @version - V2
 ************************************************/
 /* Date: January 22, 2007
 /  Section 3
 /  Lab 4
 /
 /  References and Ackknowledgements: I have recieved
 /  no help on this programming assignment
 /  *Lab originially by Elizabeth Adams
 /***********************************************/

    public class IO_rosavj_Remember
   {
      private static Scanner        dateScanner;
      private static PrintWriter    screen;
    
   /********************************************
    * Main method which we will modify by changing the input from the user
	 * to a file.  We will also make it possible to input more than one file name.
    *
    * @param Information given by the specified file
    * @return Returns the information read from the file
    *********************************************/
       public static void main(String[] args) throws FileNotFoundException//Part 4 Question 10 to get past compiler
      {
         GregorianCalendar        today;
         String                   name;       
         File                     dates;//Created for Part 4 Question 8
       
       
         today    = new GregorianCalendar();
         screen   = new PrintWriter(System.out);
       
         int size;
         size = args.length;// Determines how many files names are specified through the terminal.
         for(int i=0; i<size; i++)//Part 5 Question 1 Changing the number of files that can be read.
         {
            dates = new File(args [i]);//Initializes dates with the item specified in the array index 0.
         
            screen.printf(Locale.US, "\nToday's Date: %1$te %1$tB %1$tY\n", today);
            screen.flush();       
         
            dateScanner = new Scanner(dates);//Uses the File created to create a new Scanner object.
         
            processDates(today);
         }
      }
    
   
   
       private static void processDates(GregorianCalendar today)
      {
         int           day, month;              
         String        name;
       
      
       // Use the '\t' (tab) and '/' characters as delimiters
         dateScanner.useDelimiter("[\t/]");
          
          
         while (dateScanner.hasNext())
         {
            month = dateScanner.nextInt();
            day   = dateScanner.nextInt();
            name  = dateScanner.nextLine();
         
            if ((month == (today.get(Calendar.MONTH)+1)) && 
              (day   == today.get(Calendar.DAY_OF_MONTH)))
            {
               screen.printf("%s\n", name);
               screen.flush();
            }
         }
      }
    
   
   }
