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 - String name and Integer id.
  2. Create a constructor taking name and id as parameters and initializing the instance variables. If either is a null value you must throw an IllegalArgumentException.
    public Student(String name, Integer id){
       // Add your code to the constructor
    }
    
  3. Create an accessor method to return the name of the student.
  4. Create an accessor method to return the id of the student.