You will be provided with an input file that has a series of encoded messages. You will need to read in the file and decode the messages. You must check to make sure that the input file has been opened.
The first 26 lines of the input file will tell you what each coded letter should equal. For example: ‘A = Z’ means that for every A in a coded message, it should be replaced with a Z. You should store this information in an array for easy decoding. This set of information will always be presented A through Z so that you may assign an array position to a letter, i.e., index 0 will always be A.
The next number in the file will be the number of coded messages that will be contained in the file. This number should be used to make array of the structs (i.e., the number is the size of the array).
You will need to create a struct that contains an integer type of variable that keeps track of which message number is contained in the struct, and two strings, the coded message and the decoded message.
struct messages{
int messageNum;
string codedMessage;
string decodedMessage;
};
Then, using the getline function, you should read in a whole line of the file at a time and store it in the appropriate struct location (i.e., the string member variable of the struct used to store the coded message). You will then decode the message and store it in the appropriate struct location. A function is recommended for decoding, but not required.
Once all the messages are decoded, you should go over the array of struct and print each element with its corresponding message number, the coded message, and the decoded message, to the file [login to view URL]
3 - Example Input and Output
You have been provided with 5 input files for each test case in Black board(BB) and a sample output file too. BB consist of 5 input files namely [login to view URL] for test case 1, [login to view URL] for test case 2, [login to view URL] for test case 3, [login to view URL] for test case 4, [login to view URL] for test case 5.
You need to provide input file name in zybooks, for example : [login to view URL]
Contents of [login to view URL]
A = Z
B = Y
C = X
D = W
E = V
F = U
G = T
H = S
I = R
J = Q
K = P
L = O
M = N
N = M
O = L
P = K
Q = J
R = I
S = H
T = G
U = F
V = E
W = D
X = C
Y = B
Z = A
2
SLD NZMB KILTIZNNVIH WLVH RG GZPV GL XSZMTV Z ORTSG YFOY?
MLMV, GSZG’H Z SZIWDZIV KILYOVN
OUTPUT
It should generate a file named [login to view URL]
Contents of [login to view URL] :
Message Num: 1
Coded Message
SLD NZMB KILTIZNNVIH WLVH RG GZPV GL XSZMTV Z ORTSG YFOY?
Decoded Message
HOW MANY PROGRAMMERS DOES IT TAKE TO CHANGE A LIGHT BULB?
Message Num: 2
Coded Message
MLMV, GSZG’H Z SZIWDZIV KILYOVN
Decoded Message
NONE, THAT’S A HARDWARE PROBLEM
I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environment. I made many great projects using c++, for example, I made the tools which could convert java codes into c++ scripts, of course garbage collection included, this was very similar to a compiler, and was very complex. I also made our own mobile game using c++, I can show you the demo of client, if you like. I am very proficient in java also. I have a very good review on Freelancer.com, I never miss a project once I accept the job, you can check my review. Trust me, please let expert help you.
Hello, I am interested in this project and so wanted to discuss more it in details. I have a lot of experience in C++ programming. I will keep your time. And I will provide you quality work according to your instrument.
Thank you.
This encoding-decoding program that you described is simple to create. I can do it in less than 24 hours, in C++ as you requested. I'm ready to start, just let me know
Dear Sir,
I have read and understood your project requirements and I'm very interested to work on it. I have experience of programming. I write well formatted code with comments. Looking forward to work on your project. Awaiting your positive reply. Thank you
I've tackled similar algorithms assignments before.
Will you please specify compiler & target OS desired?
I develop with C++,
for engineering native solutions.
How soon should this be begun?
Hi,
I am a Senior Software Engineer in Silicon Valley.
I can help you with your Encode/Decode project.
We will surely be done in less than 24 hours.
Guaranteed high quality!
Let's start right away.
Okay, this seems like a fairly simple problem. I have encoded and decoded far harder problems than this. I will get this done within a day and my price point is low as I have just began in Freelancer and want good reviews.
Dear Sir,Madam
I'm a master degree student in telecommunications systems, my bachelor degree dissertation theme is : "testing an encryption method based on substitution and diffusion" I believe I do have a lot of experience in encryption,decryption, coding and decoding field.
I can code in c++/c as well
so please take in consideration my application.
I look forward to hearing from you.
sincerely,
Sofiane Khoudour
This task mainly involves file-handling and data-structures including structs. std::map can be a better option for mapping one character to another, and std::string containers can be used to decode the encoded strings.
I will start working as soon as my proposal gets approved. Looking forward to working with you.
I'm experience in using C++ input and output file-streams and encoding and decoding messages; there shouldn't be an issue in getting the project done in a day.
Have done a similar project in the past so shouldn't be to difficult.
Hello sir,
i am already doing encryption decryption project in c++ using AES algorithm . which is using in wireless security . so i can do this project easily.
Regards
Kashyap
Hey there!
I can work on your project. I have already worked on some projects like this one therefore, I'm very much confident that I can do it for you.
Also, I never compromise on work quality and deliver it before due time.
Let's discuss details in chat.