public void setClassYear(String date) {
        //initialize variable
        String date_format = "mm/yyyy";
        //prefixes a zero if the month is a single integer value
        if(date.length() != date_format.length() && date.charAt(0) != 48)
            date = "0" + date;
        //calls an error if the length is incorrect
        if(date.length() != date_format.length())
            classYearError("length");
        //call an error if no '/' in string
        if(date.charAt(2) != 47)
            classYearError("format");
        //call an error if there is an invalid char
        for(int i = 0; i < date_format.length(); i++) {
            if(date.charAt(i) < 47 || date.charAt(i) > 57)
                classYearError("character");
        }
        //sets value of class_year if the date is valid
        if(checkDate(date) == true)
            class_year = date;
        else
            classYearError("?");
    }