public static void main(String[] args) {
		if (args.length != 5){
			System.err.println("Incorrect number of arguments");
			System.err.println("Syntax: java AllAssignmentsGrader " +
			        "<hw1|hw2|...> " +
					"<gradesource_students_file> <ACMS_accounts_file> " +
					"<test_cases_file> <directory_of_submissions>");
			return;
		}
		String assignment = args[0];
		File students_file = new File(args[1]);
		File accounts_file = new File(args[2]);
		File tests_file = new File(args[3]);
		File submissions_dir = new File(args[4]);
		if (!students_file.canRead()) {
			System.err.println("can't read gradesource_students_file");
			return;
		}
		if (!accounts_file.canRead()) {
			System.err.println("can't read ACMS_accounts_file");
			return;
		}
		if (!tests_file.canRead()) {
			System.err.println("can't read test_cases_file");
			return;
		}
		if (!submissions_dir.canRead()) {
			System.err.println("can't read directory_of_submissions");
			return;
		}
		
		AssignmentGrader grader = getGrader(assignment);
		
		HashMap<String, String> ar[] = createStudentsToIds(students_file);
		HashMap<String, String> studentsToIds = ar[0];
		HashMap<String, String> idsToRealNames = ar[1];
		HashMap<String, String> accountsToStudents = createAccountsToStudents(accounts_file);;
		ArrayList<ProblemGrader> problem_graders = ProblemGrader.createProblemGraders(tests_file);
		HashMap<String, String> namesToScoresAndFeedback = gradeAllAssignments(
				grader, submissions_dir, studentsToIds, accountsToStudents, problem_graders);
		ArrayList<String> rows = new ArrayList<String>();
		for (Entry<String, String> entry : studentsToIds.entrySet()) {
			String name = entry.getKey();
			String emailId = entry.getValue();
			String scoresAndFeedback = namesToScoresAndFeedback.remove(name);
			if (scoresAndFeedback != null)
				rows.add(idsToRealNames.get(emailId) + ";" + emailId + ";" + scoresAndFeedback);
			else
				rows.add(idsToRealNames.get(emailId) + ";" + emailId + ";");
		}
		Collections.sort(rows);
		for (Entry<String, String> entry : namesToScoresAndFeedback.entrySet()) {
			String nameOrAccount = entry.getKey();
			rows.add(nameOrAccount + ";?;?;" + entry.getValue());
		}
		for (String row : rows)
			System.out.println(row);
	}