Question: Java language /** * Enrolls a student with a specified SID * * Qparam studentNumber a student number * @return true * @throws BadSIDException *


Java language
/** * Enrolls a student with a specified SID * * Qparam studentNumber a student number * @return true * @throws BadSIDException * if x is not a 9-digit number. */ public static boolean enrolStudent(int studentNumber) \{ ? return false; Complete the method enrolStudent(int studentNumber). Note that the method can throw a BadSIDException which is an exception class that has been included for you in the lab project. All the method should do is return true. However, the method should throw an exception if the number is not a 9-digit number (at York there are other factors that would allow for checking the number validity; we use a simple hypothetical rule here). Run the JUnit tester after you complete each method to check your work
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
