Prog 3: Decipher

Changes:

2/17/16 Shown in green:  Changed output words to be "Original and Changed text"

2/15/16  Shown in blue:  Changed output for decode to always show both forward and reverse values; Changed output words.

2/12/16 

Write a program to figure out what some encrypted line of text says by trying all possible decryption possibilities. For each decryption possibility look up all the words in a dictionary to see if it is recognizable English. The steps will be: 

Further Explanation

In order to try and decode the message, it is helpful to fully understand how the original plain text was encrypted in the first place. The first step reverses text. For instance sample input of

     hard work

when transposed by 1 would look like

     ibse!xpsl

Note that non-alphabetic characters are also transposed. 

In our case of trying to decrypt some ciphertext you don't know what the transposition value is, but you know it has to be between 0..95. (Using 96 would transpose each character around back to itself, so is not helpful. Thus values >95 simply replicate existing options and so are not necessary.) 

You need to know the following concepts in order to write this program:

Everything from the previous programs; arrays of char; string functions; reading text from a file; binary dictionary search

Notes:

Write the program in stages, as indicated below.  Each of the below stages is worth a certain amount out of the 55 points for program execution.

Turning In Your Program

The name of the program you will turn in should be prog3 followed by your netid and the .cpp file extension.  In other words, if your netid is reed then your program would be called prog3reed.cpp     You must also zip up the file you turn in.  After zipping your program (e.g.prog3reed.cpp), you will likely end up with a file called something like prog3reed.zip.   Only turn in this single file, turning it in on Blackboard into the assignment Program3: Decipher.  Failing to follow these naming conventions and failure to turn in a zip file will result in a 5 point deduction, even if everything else is perfect in your program.