Part 1. [25 pts] Welcome, our precious computer engineers. We were sniffing enemies’ communications, and finally one of our agents capture a folder which contains many files. The files consist of numbers from 0 to 6 and mean nothing in this form but we know there are classified messages in these files, and we need you to decrypt and visualize the files for reading that messages. After perform much effort on the file, our experts notice that the numbers represents some characters such as 0, 1, 2, 3, 4, 5, 6 are ‘ ’, ‘-’, ‘_’, ‘|’, ‘/’, ‘\’, ‘O‘ respectively (The first character is space character). You are asked to write a function that reads such files, decrypt them and visualize the secret messages in these files. Use encrypted_p1.img file to test your decryption function. The function prototype has given below:
Part 2. [20 pts] Well done! We are appreciating you about reading the first secret message in the files,
but we are not done yet. Some files don’t mean anything when we use your decryption function in
part 1. These files may be junk and inserted on purpose to prevent other files become decrypted. On
the other hand, the files still seem suspicious to our stenographers. They say that there could be
another message if the numbers in the file is replaced with the numbers gained from the formula:You are asked again to write a function that prints that deep secret messages in such files. By the
formula, if there are no longer available three number for any position such as end of lines, you can
assume the value of missing numbers are 0. Use encrypted_p2.img file to test your decryption
function. Don’t change the original file, just apply the formula when you print the actual character.
The function prototype has given below:Part 3. [25 pts] Perfect! Now, we know all the plans of enemies. Unfortunately, also the opponents know
that we know their plans. Therefore, they are constantly changing the position of their camps. We
want to make a machine to track the position of the enemy camp. The machine should have an
interface that is shown below:
Part 3. [25 pts] Perfect! Now, we know all the plans of enemies. Unfortunately, also the opponents know
that we know their plans. Therefore, they are constantly changing the position of their camps. We
want to make a machine to track the position of the enemy camp. The machine should have an
interface that is shown below: The O is our position and it is constant. E represents the enemies’ current position. X and Y is the
current axes of the position of the enemy camp. R shows the distance between current position and
the last position of the enemy camp. D is the distance of enemy to our camp. The machine should
work until the operator gives ‘E’ command to machine and it have to refresh the view of screen on
each ‘R’ command. The prototype of the function of that machine is shown below:
Get Free Quote!
392 Experts Online