Student Class

Create a Student class with the following properties.

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