+match_student_id(String): static boolean
+ format_camel(String): static
String
which verifies whether a student ID is correct. The student ID must start with se,he, or qe(ignore case) followed by exactly 4 to 6 digits.
For example: SE1234 is a correct ID but SE1234$ is not. Or hE1111 is a correct ID but hhE1111 is not.
format_camel(String): static String A static function which converts a string from "underscore" format to "camel" format. For
example: format_camel will be transformed into formatCamel
using this function
A main program is provided in binary form. You can test with following testcases to check your
code:
The program outputs might look something like:
1.Test match_pattern().
1.Test match_pattern().
1.Test match_pattern().
2.Test format_camel().
2.Test format_camel().
2.Test format_camel().
Enter your choice(1 or 2):1
Enter your choice(1 or 2):1
Enter your choice (1 or 2):1
Enter a student id:xse12345
Enter a student id:HE1111114
Enter a student id:QE12345#
OUTDUT
OUTDUT
OUTOUT.
Zoom
+ 100%
Close