Program to decode a secret message

Assignment Help C/C++ Programming
Reference no: EM13939210

For each the following programs, ensure you use the file names identified, comment in an appropriate manner, format your code appropriately (vertical and horizontal whitespace... aka. blank lines and tabs), and use good/appropriate variable names. You should expect the user to always type appropriate input (e.g., not words when a number is requested).

Decoding a secret message

Write a program that decodes a message that was encoded using a random key. These keys work similar to a magic decoder wheel (where 'A' encodes to 'F', 'B' encodes to 'G', 'C' encodes to 'H', etc)except there is a random mapping from one letter to another...

alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ
random key BDALJIFVKZEQRUXWYNTCMSGPOH

plain message encodded message
CRACKER ANBAEJN

You job is to read in a file named "encoded.txt" that contains 3 lines:

1. the random key (all uppercase)

2. the number of characters in the message (this will never be as high as 100, so an array of 100 characters will be a perfect variable to read the message into, one character at a time)

3. the encoded message (mixed case AND with punctuation and whitespace)

Your program should print the decoded message to the screen, but it should retain the upper or lower case-ness of each letter of the encoded message and print anything that isn't a letter as-is... that way the whitespace and punctuation are retained.

Here's an example encoded.txt for you to test with...
JHTIPBWNFRVDGUCZSLKYOEXQAM
82
Icu'y hp bccdpi ha ynp lctvk ynjy F wcy... F'g roky, F'g roky Jgck blcg ynp hdctv.

Reference no: EM13939210

Questions Cloud

Discuss in detail how this will affect the heart and lungs : Now consider what happens if Jake starts smoking. Discuss in detail how this will affect the heart and lungs. Think about how this habit might affect the homeostasis of the cardiovascular and respiratory system.
Coastal town of portmouthampton : The coastal town of Portmouthampton want to build a monument to celebrate their town's success. Having learned the lessons from the Spinnaker Tower, the council will not proceed with the project unless they have a project plan that can convince th..
Prepare a rate increase announcement : Your task. Prepare a rate increase announcement. Submit it along with memo explaining your rationale for the strategy you chose.
Write persuasive copy by sales letter for small business : This project allows students to demonstrate their ability to write persuasive copy by producing a sales letter for a small business.
Program to decode a secret message : Write a program that decodes a message that was encoded using a random key. These keys work similar to a magic decoder wheel (where 'A' encodes to 'F', 'B' encodes to 'G', 'C' encodes to 'H', etc)except there is a random mapping from one letter to..
A very experienced auditor takes a new auditor : Are they valid? Why or why not?Also, include whether you believe statistical methods are more favorable compared to non statistical samples. Why?
Business communication-self-reflection essay : In this task you are asked to write an essay based upon two significant communication incidents that you have experienced in the workplace.
Journal of experimental social psychology : Review. Read the Guidelines for Discussing Research Article, Part II. Review this week's article (Greitemeyer & Osswald, 2009, Prosocial video games reduce aggressive cognitions [Experiment 1]) using these guidelines (all items in the guidelines e..
Explain the causes of pelvic inflammatory disease : Why are infections of the upper respiratory tract milder as compared to the infections of the lower respiratory tract? Explain the difference between necrotizing ulcerative gingivitis and necrotizing ulcerative peridonitis.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd