Hi @DPaul ,
I like your solution. It took me a while to understand the algorithm but it is simple and efficient!
You just assume the first character is a space, and from that assumption you decypher the whole line. If the user rejects the result, you assume the second character to be a space and so on. This way you find the solution after all letters of the first word have been tried. Nice! I learned from that.
Now I am trying to understand the solution of Yoriz. His program looks very neat but some comment about the algorithm would have been helpful. He believes the code is self-explanatory as good code should be. The names of the classes (CipherData, CipherLine, CeaserCipher) indeed give a good impression of what it is all about, but it does not immediately make clear to me how the whole algorithm works. But never mind, I want to learn and hope to have it understood by tomorrow.
I like your solution. It took me a while to understand the algorithm but it is simple and efficient!
You just assume the first character is a space, and from that assumption you decypher the whole line. If the user rejects the result, you assume the second character to be a space and so on. This way you find the solution after all letters of the first word have been tried. Nice! I learned from that.
Now I am trying to understand the solution of Yoriz. His program looks very neat but some comment about the algorithm would have been helpful. He believes the code is self-explanatory as good code should be. The names of the classes (CipherData, CipherLine, CeaserCipher) indeed give a good impression of what it is all about, but it does not immediately make clear to me how the whole algorithm works. But never mind, I want to learn and hope to have it understood by tomorrow.