private RandomAgeGenerator()
        {
            source = null;
            interpolator = null;

            errorHandler = null;
            reportHandler = null;
            errorHandlerOn = false;
            reportHandlerOn = false;
        }
 public void SetAgeTables(List<double> ageBandsPassed, List<double> ageDistributionPassed)
 {
     if (source == null)
     {
         ErrorBase newError = new ErrorBase();
         newError.Name = "Source Is NULL";
         HandleError(newError);
     }
     else if (ageBandsPassed == null)
     {
         ErrorBase newError = new ErrorBase();
         newError.Name = "ageBandsPassed Was NULL";
         HandleError(newError);
     }
     else if (ageDistributionPassed == null)
     {
         ErrorBase newError = new ErrorBase();
         newError.Name = "ageDistributionPassed Was NULL";
         HandleError(newError);
     }
     else if (ageBandsPassed.Count != ageDistributionPassed.Count)
     {
         ErrorBase newError = new ErrorBase();
         newError.Name = "ageBandsPassed.Count Must Equal ageDistributionPassed.Count";
         HandleError(newError);
     }
     else if (ageBandsPassed.Count < 2)
     {
         ErrorBase newError = new ErrorBase();
         newError.Name = "ageBandsPassed.Count And ageDistributionPassed.Count Must Be At Least 2";
         HandleError(newError);
     }
     else if (IsAgeDistributionPassedNotValid(ageDistributionPassed))
     {
         ErrorBase newError = new ErrorBase();
         newError.Name = "ageDistributionPassed Was Not Valid";
         HandleError(newError);
     }
     else if (IsAgeBandsPassedNotValid(ageBandsPassed))
     {
         ErrorBase newError = new ErrorBase();
         newError.Name = "ageBandsPassed Was Not Valid";
         HandleError(newError);
     }
     else
     {
         interpolator = new Interpolator();
         interpolator.SetXAndYValues(ageBandsPassed, ageDistributionPassed);
     }
 }