public static void findYearDefects(Scanner ifile2, String defectYear)
    {
        int fieldCount = 0;
        int fieldsPerRecord = 2;
        String defectCount = "";         /* defect count listed for a given year */
        String defectYearCount = "";     /* the defect count listed for defectYear */
        boolean defectYearFound = false;
        String year = "";                /* year listed in field1 */
        String reportStatement = "";

        /* read ifile1 field by field */
        while(ifile2.hasNext())
        {
            while(fieldCount < fieldsPerRecord)
            {                    
                year = ifile2.next();
                fieldCount++;

                defectCount = ifile2.next();
                fieldCount++;

                /* if field1 (model year) equals defectYear, get the defectCount
                 * listed for that year (field2) and set defectYearCount equal to
                 * that value of defectCount */
                if(year.equals(defectYear))
                {
                    defectYearCount = defectCount;
                    defectYearFound = true;

                }//end of IF

            }//end of WHILE(fieldCount < fieldsPerRecord)

            fieldCount = 0;  //reset field counter when we reach fieldsPerRecord

        }//end of WHILE(ifile1.hasNext())

        /* close input file */
        ifile2.close();

        /* set the content of the message that will be displayed to the user */
        if(defectYearFound == true)
        {
            reportStatement = "The number of defects found for " +
            "model year " + defectYear + " vehicles is " + 
            defectYearCount;
        }

        else  //if(defectYearFound == false)
        {
            reportStatement = "The year " + defectYear + " you requested was not " +
            "found.";
        }

        /* report number of defects counted for defectYear */
        System.out.println(reportStatement);
        return;

    }//end findYearDefects()