Java API
1) Create a class in called BadDataException. Must inherit fromthe API classRuntimeException. Add a private String called message.Add two constructers (default and the overloaded constructors).
2) Create a class called Student
-Two fields: String name and String StudentNumber
-A public getter and setter for each field
-Two constructors (defualt and overloaded). When default intialvalues are required, set name and studentNumber to “Unknown”.
-Inside setName() throw a badDataException withand appropriatemessage for the following rules: String cannont be null, Stringcannon have a length of zero, String cannot consist of only WhiteSpace, String cannot contain a comma
-Inside the setStudentNumber() method throw a BadDataExceptionwith an apporpriate message for
PayPal Gateway not configured
PayPal Gateway not configured