Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The text file reads Lab 13- Top Secret Message For the lab you're given an encoded text file called secret.txt. Download it from Titanium. Your

image text in transcribed
image text in transcribed
The text file reads
image text in transcribed
Lab 13- Top Secret Message For the lab you're given an encoded text file called secret.txt. Download it from Titanium. Your goal is to write a program that can decode the text to reveal a hidden message. Objective Your program will decode the contents of secret.txt to display the message to the screen by doing the following: On startup, the program opens secret.txt for reading using an ifstream instance. 2. 1. The program reads in the data from the file as a C-string. Hint: Use getline(chard, int on your ifstream object. 3. Decode each letter of the line using the information given in the Cryptography Summary. 4. Display the decoded message to the terminal To receive credit show me the decoded message and your code. Requirements 1. Program must produce output based on the contents of secret.txt. 2. The program only needs to decode upper case letters. 3. Use good code style guidelines. Hints 1. Remember that you are working with C-strings, which are just arrays of characters delimited by a null terminator character 'O'. 2. Characters are stored as numerical values that can be used in arithmetic operations like addition and subtraction. 3. Characters can also be compared using relational operators like 4. <. and>. There are multiple ways to approach this problem. Choose the method that appeals most to you. Cryptography Summary The cryptography we'll be using is a Rot13 or a rotate by 13 places. Also known as a Cesar cypher. There are 26 letters in the alphabet, by rotating 13 places the key is it's own inverse. Encoding is the same as decoding. Take a look below Taken from Wikipedia. Benjamin D. Esham (bdesham) Your program should open up a file convert the file line by line, ether encoding or decoding (the same process for both). Don't worry about spaces or punctuation, you only need to worry about uppercase letters

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago