Build a method for performing frequency analysis

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

At the conclusion of this programming assignment, participants should be able to:

Design, implement and test classes in C++

Apply and implement overloaded operators and functions

Design and implement classes using inheritance

Parts of this assignment are courtesy of Jack Hagemeister.

Security and secrecy are popular topics in computer science. Every nation in the world has struggled with the task of communicating important information to its allies and armies at the same time trying to keep that information secret from others. In this assignment, you will be implementing some simple ciphers from history and look at ways to "decode" them. You will find that the use of modern computers makes decoding of some of these very easy.

You should first review some information about ciphers. Start at the following web site, Codes, Ciphers, &Codebreaking. It has an excellent introduction into the classic / historical Ciphers. You will need to read at least the first section, but I recommend reading sections 2 and 3 as well.

These sections include: "1.0: Introduction to Codes, Ciphers, &Codebreaking", "2.0: Refining the Art", and "3.0 The Rise of Field Ciphers".

You will design objects for each of the two encryption techniques required. Each object should hold a message that is either "clear text" or "encrypted".

You should be able to create any object around a string of text and an indicator of its status. You should have methods to retrieve the clear text or encrypted message from the object no matter how it is stored. Ok, so there are some other issues. If you have an encoded message and do not know the key in the Caesar Cipher or the substitution cipher you need methods to interact with the message to try and determine the key.

For the Caesar Cipher this is simply being able to test each key number from 1 through 25. You probably do not even have to do anything special except in the calling program. For the substitution cipher, you will have to have a method that does frequency analysis, and gives you a best guess. You may want to be able to put in substitutions as well to correct any problems that you find in the analysis.

1. Build a basic cipher base class that may be derived from for the ciphers described below.

2. Encode a text message using the Caesar Cipher, a mono-alphabetic substitution cipher. You will need to input the KEY number from 1 to 25. Do not encode special characters or white space. All encoded text should be upper case only. You should be able to save an encoded message to a file.

3. Decode a Caesar Cipher text. You will have two cases:

a. You are given the KEY.
b. You have to break the KEY by brute force trial and error.

4. Build a randomly generated simple substitution cipher and use it to encode messages. Again the encoded messages will be in all upper case letters only. Only encode the letters.

5. Build a method for performing frequency analysis to decode a substitution cipher. Your system should determine the frequency of characters in the encoded message and generate its guess on the decoding by building a lookup table as an array and supporting class that would hold each encoded pair of characters.

6. Build a standard text-based wrapper/class for the application.

Reference no: EM13702679

Questions Cloud

What magnitude of force does one line of charge exert : Two very long uniform lines of charge are parallel and are separated by 0.240m. Each line of charge has charge per unit length 5.10 C/m. What magnitude of force does one line of charge exert on a 5.00×102 m section of the other line of charge
What is the acceleration : A car moving along a staight road uniformly slows down to a speed of (5 + 0.4x) m/s in 10 seconds. During this time the car travels (150 +x) m. What is the acceleration
Find the electric field just outside the paint layer : A charged paint is spread in a very thin uniform layer over the surface of a plastic sphere of diameter 17.0 cm, giving it a charge of -16.0 µC. Find the electric field just outside the paint layer
What is its average velocity : Velocity of a moving particle is expressed by v = 2t2-t3, where y is in m and t is in seconds. What is its average velocity between t=0 and t=2seconds
Build a method for performing frequency analysis : Build a basic cipher base class that may be derived from for the ciphers and decode a Caesar Cipher text. You will have two cases.
Estimate the density of the metal : A circular metal plate has a radius of (60 + x ) cm, a thickness of 15 cm and a mass of 900 kg. What is the density of the metal
How much water is left in the container : A large container holding 340g of water, initially at 14°C is placed in a microwave oven. How much water is left in the container
Find the angle and the initial velocity of the ball : Hypothetically, you are standing on the balcony of an apartment on the 10th level of a building and you throw a ball at some angle, Î, above the horizontal away from the building. Find the angle and the initial velocity of the ball
Write an expression for the time it takes for each ball : A student at the top of a building of height h throws one ball straight upward with an initial speed of v0. Write an expression for the time it takes for each ball

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program that will read in number of 2 point basket

Write a program that will read in the number of 2 point baskets and the number of 3 point baskets a player makes.  Print the number of each baskets and the total number of points scored.

  Suggest an application system which is able to perform some

suggest an application system which is able to perform some arithmetic computations like commission system encryption

  Containing all the genes in the dna sequence

As described above plus an integer reference parameter, and return a dynamically-allocated array of strings containing all the genes in the DNA sequence. Each string in the array will contain a unique

  Prepare a binary to decimal memory game

The computer generates a random sequence of 0s and 1s creating a binary number - prepare a binary to decimal memory game.

  Refresher on andys basic requirements

The game Battleship is back and better than ever. Instead of hacking everything together in C, you will instead leverage C++ and all of your newly gained object oriented programming knowledge to construct a much cleaner end product.

  Supposed to swap numbers

The program is supposed to swap numbers, but I am stuck something is wrong! It does not swap them it repeats the second number, please help to fix! Thanks, this is in C++.

  Individual genes are substrings of a genome

Individual genes are substrings of a genome delineated by 3-element start and stop codons. Genes begin with the start codon ATG and end with one of the following 3 stop codons: TAG, TAA or TGA. Note that start codons can appear anywhere in the string..

  Skills required by personnel working in information security

What skills are required by personnel working in information security? Write down some job titles in the field and come up with some required qualifications and some desirable qualifications.

  Implement the bounded stack with a concrete class

Using Eclipse, implement the bounded stack with a concrete class names

  Print out contents of the vector

Write C++ program to provide the subsequent functionality - Ask users to enter 10 integer numbers and Print out contents of the vector.

  To deal with deadlocks we can either use prevention or

to deal with deadlocks we can either use prevention or avoidance or detection followed by recovery. but which is a

  Difference between a constant pointer

Explain the difference between a constant pointer to non-constant data and a non-constant pointer to constant data. Show the syntax to declare them.

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