|
@ -185,8 +185,23 @@ public class Administration { |
|
|
} |
|
|
} |
|
|
else if(findProfessorById(UserId) == null || findAdminById(UserId) == null || findStudentById(UserId) == null) |
|
|
else if(findProfessorById(UserId) == null || findAdminById(UserId) == null || findStudentById(UserId) == null) |
|
|
{ |
|
|
{ |
|
|
System.out.println("The Id has not been used already!"); |
|
|
|
|
|
correctData = true; |
|
|
|
|
|
|
|
|
String substring = UserId.substring(1); |
|
|
|
|
|
|
|
|
|
|
|
if(!rightPrefix(UserId, userType)) |
|
|
|
|
|
{ |
|
|
|
|
|
correctData = false; |
|
|
|
|
|
} |
|
|
|
|
|
else if(!isNumber(substring)) |
|
|
|
|
|
{ |
|
|
|
|
|
System.out.println("Every character besides the first one need to be digits"); |
|
|
|
|
|
correctData = false; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
else{ |
|
|
|
|
|
System.out.println("The Id has not been used already!"); |
|
|
|
|
|
correctData = true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
switch (userType) |
|
|
switch (userType) |
|
|