Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CODE: #include #include using namespace std; int main() { cout Objectives: The main objective of this assignment is to help you review some of the

image text in transcribed

image text in transcribed

CODE:

#include  #include  using namespace std; int main() { cout   Objectives: The main objective of this assignment is to help you review some of the concepts related to functions in C++ as well as working with files General Instructions: 1. Read the Problem Descriptions below 2. In this assignment, you will actually start with a working program 3. Split the single function given into multiple functions 4. Read the input from a file 5. Files provided for this assignment can be found on Blackboard. Task Description: The program in CombinationCipher.cpp takes a message written by the user and puts it through multiple ciphers. A cipher is a technique to create a secret code from a message. A combination cipher uses multiple ciphers to encode the same message. This combination cipher uses a Keyboard cipher twice and then uses Morse code The Keyboard Code is just the order of letters your keyboard. The top row is the original letter, bottom row is the encoded letter ABCDEFGHIJKLMNOPQRSTUVWXYZ QWERTYUIOPASDFGHJKLZXCVBNM The program in CombinationCipher.cpp file works, but it is ugly and harder to understand than it should be. That's because it was written without functions other than main ). As a consequence, a lot of code gets repeated, and the overall logic of the program is hidden by the mass of details Rewrite the program by grouping the a file 'input.txt' instead of the terminal. In particular, your program should include the following func tions code into functions. Change the program so it takes the input from 1. A function named readInput that returns a string containing the message from a file. The parameter should be an fstream passed by reference

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

More Books

Students also viewed these Databases questions

Question

2. Describe why we form relationships

Answered: 1 week ago

Question

5. Outline the predictable stages of most relationships

Answered: 1 week ago