Creating Your Own Exception Class

For one point of extra credit, you are to create your own Exception class, named DuplicateIDexception. The exception is to be thrown whenever a Student is constructed who does not have a unique ID. When the exception is caught, a message to the user with the name of the student and the ID is displayed as follows:
Joe Smith's ID number, 30, is not unique and can not be assigned.

To help you accomplish this task, you are to store all IDs into a TreeSet. Click here for the API of a TreeSet.

Your Exception class constructor should take at least two arguments:

You should also implement an accessor method for acquiring name of the student and the number which caused the exception. Be sure to add students to the students.txt file to test your exception class.