EVEN-EVEN Simulation

Simulate the EVEN-EVEN automaton found in the book in code. Donâ€™t just â€œsolve the problemâ€â€”implement the machine (i.e., there should be evidence of the states and transitions in your code). Input at least the strings below. The output should echo the string in quotes and indicate whether it is in the language EVEN-EVEN or not.

a, abab, aabbab, baab, <the empty string>
My solution was written in JAVA and consists of approximately 80 lines of code. Please feel free to comment on my code. Are there things that I could have done better? Are there things that I could explain further. Remember this is my code, and that I have displayed it here for others to learn from. Don’t simply copy it and call it your own. I own copyright, and because I show the code does not mean that I have given up my rights to this code.