Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Please, as soon as possible I need help with these files document CISP.cpp, Encrypt.cpp, Encrypt.h, Decrypt.h and Decrypt.cpp ... Please I need all these

Please Please, as soon as possible I need help with these files document CISP.cpp, Encrypt.cpp, Encrypt.h, Decrypt.h and Decrypt.cpp ... Please I need all these files

A company wants to transmit data over the telephone, but is concerned that its phones could be tapped. All of the data are transmitted as four-digit integers. The company has asked you to write a program that encrypts and decrypts the data so that it can be transmitted more securely. Your program should read a four-digit integer and encrypt it as follows: Replace each digit by (the sum of that digit plus 7) modulus 10. Then, swap the first digit with the third, swap the second digit with the fourth and print the encrypted integer. Create an Encrypt class to do the encryption, create a decrypt class to do the decryption (convert the encrypted number to its original number)

Your main duty for this assignment is creating an Encrypt class which includes Encrypt.h and Encrypt.cpp, and Decrypt class which includes Decrypt.h and Decrypt.cpp. After finish the tasks you can use CISP.cpp to test the Encrypt and Decrypt classes.

The following is the Encrypt class specification.

1. The Encrypt class has an integer private data member 8 element array named digits. The first four elements (0 ~ 3) are to store the original 4 digits integer and the next four (4 ~ 7) are to store the encrypted data.

2. Encrypt class has several public member functions

a. An Encrypt constructor takes an integer of any digits and stores the last four digits. It encrypts the last four digits, stores the encrypted information, displays a call to this constructor information, and shows the original information and encrypted information. If the inputted number is less than or equal to 0 the integer is set to 9436.

b. The other Encrypt constructor takes an array of any length and stores the first four digits (0 ~ 3). It encrypts the first four digits, stores the encrypted information, displays a call to this constructor information, and shows the original information and encrypted information. If the inputted first four is less than or equal to 0 the integer is set to 9436.

c. A displayOriginalData function does not accept and return any data. It displays the first four elements of the private data member.

d. A storeData function takes an integer and does not return anything. It stores the last four digits of the passed in integer to the first 4 elements of the private data member, encrypts the data and store them in the last 4 elements of the private data member.

e. A displayEncryptedData function does not accept and return any data. It displays the last four elements of the private data member.

f. A getEncryptedData function does not accept any data. It returns an integer, the 4 digit encrypted integer.

The following is the Decrypt class specification.

1. The Decrypt class has an integer private data member 8 element array named digits. The first four elements (0 ~ 3) are to store the decrypted data and the next four (4 ~ 7) are to store the inputted first 4 digits integer data which should be encrypted data.

2. Decrypt class has several public member functions

a. A decrypt constructor takes an integer of any digits and stores the last four digits. It decrypts the last four digits, stores the decrypted information, displays a call to the constructor information, and shows the original and decrypted information. If the inputted number is less than or equal to 0 the integer is set to 1234.

b. Another decrypt constructor takes an integer array of any size and store the array element 0 to 3. It decrypts the 0 ~ 3 elements, stores the decrypted information, displays a call to the constructor, and shows the original and decrypted information. If the inputted number is less than or equal to 0 the integer is set to 1234.

c. A displayOriginalData function does not accept and return any data. It displays the last four elements of the private data member.

d. A storeData function takes an integer and does not return anything. It stores the last four digits of the passed in integer to the last 4 elements of the private data member, decrypts the data and store them in the first 4 elements of the private data member.

e. A displayDecryptedData function does not accept and return any data. It displays the first four elements of the private data member.

f. A getDecryptedData function does not accept any data. It returns an integer, the 4 digit decrypted integer.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions