Question: The Decoding Process The original message from Orphan Annie was encoded to make it secret. The goal is to reverse the process so that it
The Decoding Process The original message from Orphan Annie was encoded to make it secret. The goal is to reverse the process so that it becomes readable again. Any character in the encoded message that is an uppercase character should be converted to lowercase and then subtract from it So D should become cE should become d etc... The first uppercase letter is the exception the A should be wrapped around to the end of the alphabet so that it becomes z Any character in the encoded message that is a lowercase character should be converted to uppercase and then add to it So a becomes Bb becomes C etc... The last lowercase letter is the exception the z should be wrapped around to the beginning of the alphabet so that it becomes A Any character in the encoded message that is a digit should be converted as follows: apostrophe single quote ; comma Any character in the encoded message that is one of the following punctuation characters should be converted to a digit character as shown below. Any punctuation that is not shown here should not be altered. @ # $ & To test for a punctuation character, C has a function named ispunct that will return true if a character is punctuation or false if it is not punctuation. The function can be used as follows: if ispunctvalue assuming that value is a char variable that holds the character to be tested. Make sure to add an include statement for the cctype library to access the ispunct function. There are two special characters in the encoded message that should be converted to a white space character. an ASCII value of should be converted to a blankspace an ASCII value of should be convereted to a newline character
Any character that does not fit the categories listed above should not be altered. Program Requirements As with the previous assignments and the assignments until the end of the semester, complete program documentation is required. For this assignment, that means that line documentation is needed. There is no need to document every single line, but logical "chunks" of code should be preceded by a line or two that describe what the "chunk" of code does. See the documentation standards on the course webpage for more examples or if further clarification is needed. A program will not get full credit even if it works correctly if these standards are not followed. This is the final reminder that will appear in the assignment writeups. When converting an alphabetic character, DO NOT use a decision statement with separate tests. Take advantage of the fact that characters are stored as integers. A reminder A is stored as while a is stored as Make sure that the open statement in the CPP file that is submitted for grading contains only "encodedtext.txt Hand in a copy of the source code the CPP file using Blackboard. There is no need to hand in the input file.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
