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 -
String nameandInteger id. - 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 } - Create an accessor method to return the name of the student.
- Create an accessor method to return the id of the student.