| CS285 -- Lab 1: Decryption |
|
|
Each student should complete this lab individually.OverviewThis laboratory assignment has many learning goals including:
Encryption is the converting of a message into unreadable text that conceals the original meaning. Decryption is the deciphering of a coded message back into its original readable form. Many forms of encryption exist and many are very complicated and essentially impossible to hack without essential decryption information. AcknowledgmentThis laboratory was developed by Dr. Lisa Milkowski. ProceduresDesign and implement a C++ program to decrypt a text file. The provided text file has been encrypted using a straightforward algorithm. Each letter in a given word has had its letter value shifted by a fixed amount. The amount of the shift is fixed within that word. The next word also has each letter shifted in letter value but by a value unique to that word. Original Message: The sky is the limit. Encrypted Message: Jxu jbp rb the ebfbm. Note that when shifting forward or backward by a fixed amount, the end of the alphabet wraps around to the beginning of the alphabet. For example, the original letter of 'z' may be encrypted as 'c' with a fixed shift of 3. This wrapping of the alphabet is performed for uppercase and lowercase letters. It may additionally be noted that the encrypted message words are still the same length and still separated by spaces. Punctuation is not encrypted and should be left unchanged. In order to do this assignment, you will need to download two files:
Your C++ program should decode all the words in the example file encoded.txt. You have successfully decoded a word if you have found it in the dictionary text file. You are required to create at least two classes. One class, for the encoded.txt file, should make use of the string and vector classes to store each word in the encoded.txt file in a vector of strings. The other class should make use of the list class to store each word in the dictionary.txt file in a list of strings. It is always a good design choice to consider potential modifications that may be required at some later date. Be sure to keep in mind when designing your program. Think about what additional changes you might want your decryption program to be able to do. This lab should serve as a programming review. As a result, some of you may find that the assignment does not provide a significant challenge. There are a number of ways in which you can expand this assignment to make it more interesting. Here are a few ideas:
Feel free to embellish your program with any other features that you would like your program to have. However, keep in mind that you should meet the minimum assignment requirements before adding additional components. Lab report (due 11:00pm, the day prior to week 3 lab)Your lab report should be an independent document. That means that someone should be able to understand what you did and why without seeing anything other than your report. Your report should include:
As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic submission guidelines. (You may wish to consult the sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost. It may be wise to keep a diskette backup as well. Your grade will depend on quality of design, clarity of code and documentation, as well as whether your program produces the correct results. If you have any questions, consult your instructor. |
| © 2001-2002 Dr. Christopher C. Taylor | Office: CC-27C | Phone: 277-7339 | Last Updated: December 13, 2001 |
| I am responsible for all content posted on these pages; MSOE is welcome to share these opinions but may not want to. | |||