public void buildTAFFile(ArrayList<String> names,
            ArrayList<String> numbers,
            ArrayList<String> courses) throws IOException {
        File workAreaFile = new File(directory + WORK);
        HashMap<String, String> workAreas = loadWorkAreas(workAreaFile);

        HashMap<String, ArrayList<String>> seniorities = new HashMap<String, ArrayList<String>>();

        File fTaf = new File(directory + TAF);
        BufferedWriter bw = new BufferedWriter(
                new FileWriter(fTaf.getAbsoluteFile()));
        String[] split = null;
        String line = null;
        String courseLine = null;
        String[] timeZone = {"10-2", "2-6", "6-10"};
        int courseLoad = 0;
        for (int i = 0; i < size; ++i) {
            do {
                split = courses.get(rand.nextInt(courses.size() - 1)).split("\t");
            } while (!(split.length > 5));
            String instructor = names.get(rand.nextInt(names.size() - 1));
            line = instructor
                    + "\t"
                    + numbers.get(rand.nextInt(numbers.size() - 1));
            bw.write(line);
            bw.newLine();
            line = split[5];
            String days = "";
            for (int j = 0; j < line.length(); ++j) {
                Character character = line.charAt(j);
                character = Character.toLowerCase(character);
                //System.out.println(character);
                if (character.equals('r')) {
                    days += 't';
                    character = 'h';
                }
                if (character.equals('s')) {
                    days += 's';
                    character = line.charAt(++j);
                }
                days += character + ",";
            }
            /*
             char[] clean = days.toCharArray();
             clean[clean.length-1] = '\b';
             * */
            String clean = days.substring(0, days.length() - 1);
            clean += "\t";
            //String formatted = new String(clean);
            courseLoad = rand.nextInt(3) + 1;
            clean += timeZone[courseLoad - 1];
            bw.write(clean);
            bw.newLine();
            for (int j = 0; j < courseLoad; ++j) {
                split = courses.get(rand.nextInt(courses.size() - 1)).split("\t");
                String[] course = split[1].split(" ");
                if (split[2].contains("L")) {
                    split[2] = split[2].substring(0, split[2].length() - 1);
                }
                while (split[2].length() < 3) {
                    split[2] = "0" + split[2];
                }
                line = course[0] + course[1] + "," + split[2];
                bw.write(line);
                bw.newLine();

                String key = workAreas.get(course[0] + course[1]);
                ArrayList<String> instructors = seniorities.get(key);
                if (instructors == null) {
                    instructors = new ArrayList<String>();
                }
                instructors.add(instructor);
                seniorities.put(key, instructors);
            }
            bw.newLine();
        }
        bw.flush();
        bw.close();

        buildSeniorityFile(seniorities);
    }