public static float getAverage(ArrayList<Integer> nums) throws BadGradeException {
		float total = 0;
		for (int grade : nums) {
			if (grade > 100) {
				throw new BadGradeException("Bad negative grade: " + grade, true);
			}
			
			else if (grade < 0) {
				throw new BadGradeException("Bad positive grade: " + grade, false);
			}
			
			else {
				total += grade;
			}
		}

		return total/nums.size();
	}