   import java.awt.Color;
   import java.io.*;

/**
 * A driver that can be used to demonstrate the
 * ColorFinder class
 */ 
    public class DriverDebug
   {
    /**
     * The entry point of the application
     *
     * @param args   The command-line arguments (not used)
     */
       public static void main(String[] args) throws IOException
      {
         BufferedReader   console;
         Color            color;       
         ColorFinderDebug      finder;       
         String           name, prompt;
       
         finder  = new ColorFinderDebug();       
         prompt  = "Enter the name/description of a color: ";
         console = new BufferedReader(new InputStreamReader(System.in));
      
         System.out.println(prompt);
         name = console.readLine();
      
         while (name.length() > 0 )
         { 
            System.out.println (name + " and " + name.length() );   
            color = finder.getColor(name);
            if (color != null)
            {
               System.out.println(name + ": " + color + "\n");             
            } // end if
            else
               System.out.println (name + " is not a real color ");
            System.out.println(prompt);
            name = console.readLine();
            System.out.println (name + " and " + name.length() );   
         } // end while
      }
   }
