i need some help programming...

Hey all,
My professor assigned a final without teaching us how to go about it. I'm honestly in the dark on how to go about this so all help is appreciated. I've spent two hours trying to come up with something and I'm just stumped. Here are my two problems:

FIRST PROBLEM
Although they are certainly simple, Caesar ciphers are also extremely easy to break. There are, after all, only 25 values for the number of characters to shift. If you want to break a Caesar cipher, all you have to do is try each of the 25 possibilities and see which one translates the original message into something readable. A better scheme is to allow each letter in the original message to be represented by an arbitrary letter instead of one a fixed distance from the original. In this case, the key for the encoding operation is a translation table that shows what each of the 26 letters becomes in the encrypted form. Such a coding scheme is called a letter-substitution cipher.
The key in a letter-substitution cipher is a 26-character string that indicates the translation for each character in the alphabet in order.

For example, the key "QWERTYUIOPASDFGHJKLZXCVBNM" indicates that the encoding process should use the following translation rule:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
||||||||||||||||||||||||||
QWERTYUIOPASDFGHJKLZXCVBNM

Write a program that implements encryption using a letter-substitution cipher. Your program should be able to duplicate the following sample run:

Enter a 26-letter key: QWERTYUIOPASDFGHJKLZXCVBNM
Enter a message: WORKERS OF THE WORLD UNITE!
Encoded message: VGKATKL GY ZIT VGKSR XFOZT!


SECOND PROBLEM
In James Thurber’s children’s story The Wonderful O, the island of Ooroo is invaded by pirates who set out to banish the letter O from the alphabet. Such censorship would be much easier with modern technology. Write a program that asks the user for an input file, an output file, and a string of letters to be eliminated. The program should then copy the input file to the output file, deleting any of the letters that appear in the string of censored letters, no matter whether they appear in uppercase or lowercase form.
As an example, suppose that you have a file containing the first few lines of Thurber’s novel, as follows:

TheWonderfulO.txt
Somewhere a ponderous tower clock slowly
dropped a dozen strokes into the gloom.
Storm clouds rode low along the horizon,
and no moon shown. Only a melancholy
chorus of frogs broke the soundlessness.

If you run your program with the input
Input file: TheWonderfulO.txt
Output file: TheWnderful.txt
Letters to banish: o

it should write the following file

TheWnderful.txt
Smewhere a pnderus twer clck slwly
drpped a dzen strkes int the glm.
Strm cluds rde lw alng the hrizn,
and n mn shwn. nly a melanchly
chrus f frgs brke the sundlessness.
and I'm just stumped


Stumped with what? Do you understand the assignments? If you had to provide instructions to someone else to perform these tasks who hadn't been given the description, what detailed instructions would you provide? How would you do these using pen and paper? Once you have the instructions (the algorithm), then you produce a program design and then code the program from the design, compiling and testing frequently.

If you already have the program design, what c++ coding issues are you having from coding the design?

Programs are first designed and then coded - not coded 'on the hoof' with no prior design.

A rough 'rule of thumb' is that design work is about 50% of the effort required to produce a program, with 30%-40% effort actual coding and the remaining 10%-20% for testing and debugging.
Topic archived. No new replies allowed.