Chris Pollett>Old Classes>PIC 20, Winter 2000>Hw2>Hw2 FAQ
No. But you are strongly encouraged to do so. You ARE REQUIRED though to have at least one switch statement in your program. The intention was for you to use this to switch on which state of the automata you were in. Having experience with finite automata will serve you in good stead in a compilers class and also if you happen some day to need to some kinds of string matching.
No. You should use the same pattern not found message as in the other cases.
Sure. It's fine. This will probably improve the readability of your code.