Write a program in which set up a douhly-subscripted array

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

Write a program in which you set up a douhly-subscripted array to store each character in the wit. Ube ;old loops, and the most efficient  statements to do it. Include documentation (comment stmts.) in your program.

522_Assignment.png

A secret (shhh!): the keyword is PARKING

Have your program read in a message from the text Ilk you will find in Blackboard (please do riot reitamt, thy file), and store its letters with no spaces or punctuation, in a singlyssubscripted array. Then have your plovion use the keyword to encrypt the message and show the encrypted message on the screen. liert is how the encryption works using pencil and paper: Above the letters of the plain text illeSsage, write the lc tern tht: keyWOrd, repeating as much as necessary, For example lithe message is: meet me at midnights you would
write:

1845_Assignmnet1.png

Then look ibr the row in the table that begins with P and find the column headed NI. Use the corresponding letter in the body of the table, which is B. This is the first letter of the encrypted message. Continuing. for the next letter, find the row in the table that begins with . and the column that is headed F. and the body of the table happens to give E. For the next letter, the row beginning with R and the column headed F giN es a your encrypted message starts BEV.... {Notice that frequency-of-occurrence cannot he used to break this code.)

Follow these specifications:

In main, set up an array to hold the 7 characters of the keyword. In this program. do not make an array that stores the keyword repetitively. That would be inefficient. Instead, you can manipulate subscripts.

Declare all your array variables in the main program. Assume the message you Nvill encode has 100 characters or fewer.

In main. open a file for input, and include a trap to make sure it opened correctly.

Call a function to read in the original message and store it in an array. Skip spaces and punctuation. Make your program general enough so it can be run with a different input file that has a different-length message.

Back in the main program. print out the number that says how many characters are stored.

Call a function to set up and store the 2-dimensional Vigenere Table.

Back in the main program. print out the numbers that say how many rows and how many columns were used. Call a function to do the encoding.

Back in the main program. print out to the screen the original message (without spaces or punctuation), and on the line below it, print out to the screen the encrypted message.

Make sure there aren't any extra characters or missing characters.

Check at least some of the results by hand.

Run the program again with the other file's input data, and check the results.
p
lA
A recommendation: to facilitate checking, try your program first with an input file containing just a short phrase - for example

THE MESSAGE.

For the Detailed Plan: The specifications above give a rough starting outline. In your Plan, decide on variable names, types of variables. and in particular, how information from main will be passed down into the functions, and how information from the functions will be passed back to main. Use generic names for the arguments in the functions, that is, different names from what you use in main. You also need to plan in detail what steps need to be carried out inside each function. Your Plan is not to be C++ code.

Before you hand in the (neatly) hand-written Plan, please make a copy for yourself, so you can start %Norking on writing the C--f-+ code.

Reference no: EM13326421

Questions Cloud

How many bins can the manufacturer now produce : Suppose that the costs are expected to go up to $6 per squarefoot (base) and $4 per square foot (sides), by the end of theyear.How many bins can the manufacturer now produce if she stillwishes to minimze material costs
Determine how many feet of fence will be needed : A local contractor has just bought warehouse and decided to fence in an area of 1152 square feet behind the warehouse.He plans to use the wall of the building as one of the four sides that will enclose the rectangular area.
Calculate maximum and minimum speeds of particles : A transverse traveling wave on a cord is represented by D = 0.25 sin (6.8x + 28t) where D and x are in meters and t is in seconds. Determine maximum and minimum speeds of particles of the cord
Find the magnitude of the net force that acts on the charge : A magnetic field has a magnitude of 0.0018 T, and an electric field has a magnitude of 3.4 × 103 N/C. Both fields point in the same direction. find the magnitude of the net force that acts on the charge
Write a program in which set up a douhly-subscripted array : Write a program in which you set up a douhly-subscripted array to store each character in the wit. Ube ;old loops, and the most efficient  statements to do it. Include documentation (comment stmts.) in your program.
Find the horizontal displacment of the ball : A hard steel ball is dropped from rest at postion y = 2h and bounces from a hard surface tilted at an angle phi from horizontal. On impact, Find the horizontal displacment of the ball
How long is the ball in the air in each case : In an English carnival game, you throw a ball at a coconut on a stand 4.0 m in front of you and 1.0 m above the point at which you release the ball. How long is the ball in the air in each case
How far from the bottom of the cliff does the base hit water : In the movie The God's Must Be Crazy, a bottle is thrown from a cliff overlooking the Indian Ocean. How far from the bottom of the cliff does the base hit the water
Daniel pink reports that rewards and punishments : High-school athletes who skip college to become professional athletes and negative externality occurs when-benefits are imposed on individuals that are not part of a transactions.

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