Modify the DataSetReader class so that you do not call hasNextInt or hasNextDouble. Simply have nextInt and nextDouble throw a NoSuchElementException and catch it in the main method.

Complete the following files:

DataAnalyzer.java

DataSetReader.java

Use the following file:

BadDataException.java

/**
   This class reports bad input data.
*/
public class BadDataException extends Exception
{
   public BadDataException() {}
   public BadDataException(String message)
   {
      super(message);
   }
}