subject

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 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. Your main duty for this assignment is creating an Encrypt class which includes Encrypt. h and Encrypt. cpp. After finishing the task you can use CISP400V10A2.cpp to test the Encrypt class. 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 the 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. A displayOriginalData function does not accept and return any data. It displays the first four elements of the private data member. 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.
d. A displayEncryptedData function does not accept and return any data. It displays the last four elements of the private data member.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:30
Select the correct answer. larry finds it easy to run legacy programs and applications in a virtualized environment. how does the virtualization provider make this possible? a. combines workloads of several underutilized servers to fewer machines b. installs and runs different versions of an operating system on the same computing device c. moves virtual machines from one server to another server at a different location d. streamlines and automates management tasks
Answers: 1
question
Computers and Technology, 22.06.2019 00:00
Which requirement is an appropriate reason for a business to use it tools
Answers: 3
question
Computers and Technology, 23.06.2019 22:20
What is a programming method that provides for interactive modules to a website?
Answers: 1
question
Computers and Technology, 25.06.2019 01:30
Ashort circuit locator should be periodically run along the cords used in a shop to check for shorts and open circuits. a.)true b.)false
Answers: 2
You know the right answer?
A company wants to transmit data over the telephone, but is concerned that its phones could be tappe...
Questions
Questions on the website: 13722363