Question: Specifications as outlined in class discussions Input -The program should read, in order, from standard input (a.k.a. the console window) - The filename of the

 Specifications as outlined in class discussions Input -The program should read,in order, from standard input (a.k.a. the console window) - The filename

Specifications as outlined in class discussions Input -The program should read, in order, from standard input (a.k.a. the console window) - The filename of the text file to open - The cipher key for encryption/decryption - Note: No one asked about the length of the cipher key. Therefore it remains a mystery... - A digit: 1 to encrypt or 2 to decrypt If the file does not exist, or the user somehow provides bad input data, the program should not crash. Instead, it should print a message to show the user how to use the program: Usage : Cipher fileToCpher cpherKey 1forEncode / 2 forDe code Encryption and Decryption To encrypt a message, each letter in the message is shifted right by a number corresponding to the distance of the cipher key letter from the first letter in the alphabet. The cipher key is reused over and over until the message is encrypted. Punctuation and spaces are not encrypted but still appear in the encoded message. Uppercase and lowercase must be preserved. Letters wrap" around from z to a Message: The ships sail at dawn. Cipher key: swiftly Output: Ldm Isgho xttj wb wluf Message letter Cipher letter Shift Right Result 18 none 19 25 18 none 19 25

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!