Programming a DFA in java? need assistance

Dear Members,

I have to program a D.F.A (deterministic finite automaton) for my computer foundations class, and i am stuck. DFA's use states and i understand the theory part of it in class. How do i program those states in java? This is the language that i need to code

http://web.njit.edu/~marvin/cs341/progs/prog1url.pdf

I completely understand what the pdf is asking for but just do not know how to code it or you can say i am having difficulty on how to make the transition.

Any ideas?

Thanks ~o)