Realized there was an error in my implementation. The inner ring needs to be rotated each time, not the middle ring. The rotateRings() method has been changed to reflect this and MiddleRotorCount has been renamed to InnerRotorCount. Despite this, the code still does not decode the message in the assignment. I think I need to change how the rotors themselves are rotated.
The rings now rotate clockwise. The code successfully decodes the message in the assignment. Encoding still needs to be tested.
encode() method now works properly. Did some cleanup in rotateRings(). Commented out main(). Tweaked secondary constructor so that the keys are always uppercase.