Question
Must be programmed in C++: http://pastebin.com/4HGxL6J8 My code so far is linked above ^ Currently trying to get encode and decode functions to work properly
Must be programmed in C++:
http://pastebin.com/4HGxL6J8
My code so far is linked above ^
Currently trying to get encode and decode functions to work properly as the rest if the functions work. Here is the requirements for the two:
string encode (string message, string key)
converts message using lower_and_strip o key is not changed, but is used as is!
for every character in the message o call return_encoded_char with that character
o concatenates the number into a space separated string
returns the encoded message
string decode (string encoded_text, string key)
for every character in encoded_text
o call return_decoded_char with that character
o concatenates the number into a string
returns the encoded message
Sample case for the encode function:
3 abcdefghijklmnopqrstuvwxyz help me
Excepted output:
7 23 7 4 23 18
Sample case for decode function:
5 abcdefghijklmnopqrstuvwxyz 7 23 7 4 23 18
Excepted output:
helpme
Thank you for the help in advance!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started