文件名称:java2
介绍说明--下载内容均来自于网络,请自行研究使用
实验三:加密
实验目的:1.解决问题的基本技巧
2.编写伪码
3.实现算法
4.修改程序以执行不同的任务
问题描述:一家公司希望通过电话传输数据,但担心电话可能会遭到监听。所有的数据都是
以四位整数进行传输的。该公司要求你编写一个程序,对数据进行加密,一边数据的传输更加安全。应用程序应在输入对话框中读取用户输入的四位整数,然后按如下方式对其加密:计算各位数加上7后的和,再除以10,用所得到的余数替换对应的数字。然后交换第一个数字和第三个数字,第二个数字和第四个数字。显示加密后的整数。
-Experiment 3: Encryption experimental purposes: 1. Problem-solving skills 2. Write pseudo-code algorithm to modify the program to perform different tasks: a company wants to transfer data via telephone, but worried phone may be subject to monitoring. All data are based on four integer transmission. The company asks you to write a program to encrypt data, while the data transfer more secure. The application should read the user to enter four integers in the input dialog box, and then encrypting it follows: Calculate the Honourable plus 7 after, and then divided by 10, with the remainder replaced by the corresponding number. And then swap the first digit and the third digit, the second number and the fourth digit. Display the encrypted integer.
实验目的:1.解决问题的基本技巧
2.编写伪码
3.实现算法
4.修改程序以执行不同的任务
问题描述:一家公司希望通过电话传输数据,但担心电话可能会遭到监听。所有的数据都是
以四位整数进行传输的。该公司要求你编写一个程序,对数据进行加密,一边数据的传输更加安全。应用程序应在输入对话框中读取用户输入的四位整数,然后按如下方式对其加密:计算各位数加上7后的和,再除以10,用所得到的余数替换对应的数字。然后交换第一个数字和第三个数字,第二个数字和第四个数字。显示加密后的整数。
-Experiment 3: Encryption experimental purposes: 1. Problem-solving skills 2. Write pseudo-code algorithm to modify the program to perform different tasks: a company wants to transfer data via telephone, but worried phone may be subject to monitoring. All data are based on four integer transmission. The company asks you to write a program to encrypt data, while the data transfer more secure. The application should read the user to enter four integers in the input dialog box, and then encrypting it follows: Calculate the Honourable plus 7 after, and then divided by 10, with the remainder replaced by the corresponding number. And then swap the first digit and the third digit, the second number and the fourth digit. Display the encrypted integer.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
java2.doc