Yossarian22
[H]ard|Gawd
- Joined
- Apr 27, 2009
- Messages
- 1,799
In Java, I almost have this assignment done but I'm stuck on a logical condition.
I built this entire class from scratch and the UML diagram dictates that the employee number is a string in the format XXX-L, where each X is a digit within the range of 0-9 and L is the letter within the range of A-M.
I have checking for the digits and the hyphen complete, however, is there a way to check the 4th element of this string and ensure it is within the unicode range of A-M besides having 13 logical conditionals (if String.CharAt(4) == 'A' && String.CharAt(4) == 'B' ... etc) ?
Thank you in advance.
I built this entire class from scratch and the UML diagram dictates that the employee number is a string in the format XXX-L, where each X is a digit within the range of 0-9 and L is the letter within the range of A-M.
I have checking for the digits and the hyphen complete, however, is there a way to check the 4th element of this string and ensure it is within the unicode range of A-M besides having 13 logical conditionals (if String.CharAt(4) == 'A' && String.CharAt(4) == 'B' ... etc) ?
Thank you in advance.