Although your code doesn't currently do what it needs to, it should compile, right?

You should be able to write the validation methods reasonably easily (the validCode method is the only one which...