Answered step by step
Verified Expert Solution
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
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
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