public class InvalidGradeException extends IllegalArgumentException
2: /**
3: * A class to represent the error of assigning an invalid grade to a Student.
4: *
5: * @auther Mark Young (A00000000)
6: */
7: public class InvalidGradeException extends IllegalArgumentException {
9: public InvalidGradeException() {
10: }
12: public InvalidGradeException(String msg) {
13: super(msg);
14: }
16: /**
17: * An extra constructor so we can create the exception by just giving the
18: * illelal grade:
19: * new InvalidGradeException(195);
20: *
21: * @param grade the number that's not a valid grade
22: */
23: public InvalidGradeException(int grade) {
24: super(Integer.toString(grade));
25: }
27: }