Student Class
Create a Student class with the following properties.
- A student record contains a name and id, so this class will have two non-null private data members - name and id.
- Create a constructor taking name and id as
parameters and initializing the instance variables. If they are null values
you must throw a
IllegalClassFormat
Exceptionpublic Person(String name, int id) throws IllegalClassFormatException{ // Add your code to the constructor }
The API for the IllegalClassFormatException can be found here. - Create an accessor method to return the name of the student.
- Create an accessor method to return the id of the student.