ImageVerifierCode 换一换
格式:DOCX , 页数:13 ,大小:19.50KB ,
资源ID:17995141      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/17995141.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(java基于命令行的学生成绩管理系统Word格式.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

java基于命令行的学生成绩管理系统Word格式.docx

1、 public static void main(String args) throws Exception MainMenu mainmenu=new MainMenu(); mainmenu.StartMenu(); class CreateFile CreateFile() throws IOException Scanner s=new Scanner(System.in); System.out.println(Where to create?(D:/aaa/.); String CurrentDirectory=s.next(); File file=new File(Curren

2、tDirectory); if(file.exists() System.out.println(Enter the name: String Name=s.next(); File f = new File(CurrentDirectory+File.separator+Name) ;/ 实例化File类的对象 f.mkdir() ;success to create! else System.out.println(the directory isnt exist!class DeleteFile File path; public DeleteFile(File path) this.p

3、ath=path; public void Delete(File path) File filelist=path.listFiles(); int listlen=filelist.length; for(int i=0;ilistlen;i+) if(filelisti.isDirectory() Delete(filelisti); else filelisti.delete(); path.delete();/删除当前目录 void Success()Success to delete!:class EnterDirectory EnterDirectory(String path)

4、 throws IOException Runtime.getRuntime().exec(explorer.exe + path);class ListDirectory ListDirectory(String path) / String luj=null;/路径 /如果dir不以文件分隔符结尾,自动添加文件分隔符 if(!path.endsWith(File.separator) path = path + File.separator; File dirFile = new File(path); /如果dir对应的文件不存在,或者不是一个文件夹则退出dirFile.exists()

5、 | (!dirFile.isDirectory() System.out.println(List failed!cannot find the directory:+path); /list方法返回该目录下的所有文件(包括目录)的文件名,文件名不含路径信息 System.out.println(path+ contains below directorise or files String files = dirFile.list(); for(int i = 0; i 0) out.write(buffer, 0, r); cis.close(); is.close(); out.clo

6、se(); * 文件采用DES算法解密文件 * param file 已加密的文件 如c: * * param destFile * 解密后存放的文件名 如c:/ test/解密后文件.txt public void decrypt(String file, String dest) throws Exception cipher.init(Cipher.DECRYPT_MODE, this.key); OutputStream out = new FileOutputStream(dest); CipherOutputStream cos = new CipherOutputStream(o

7、ut, cipher); while (r = is.read(buffer) = 0) cos.write(buffer, 0, r); cos.close(); void DES() throws Exception inuput encrypted password: Scanner scan = new Scanner(System.in); String td1=scan.nextLine(); /以上两行用来实现字符串的输入。 TestDES td = new TestDES(td1); /【对称加密的密码所在】encrypt: inuput source file and tar

8、get file: String sourcee=scan.next(); String targete=scan.next(); td.encrypt(sourcee, targete); /加密 encryption is plete!decrypt:inuput decryptioned password: Scanner scanf = new Scanner(System.in); String td2=scanf.nextLine(); TestDES tdd = new TestDES(td2); String sourced=scan.next(); String target

9、d=scan.next(); tdd.decrypt(sourced,targetd); /解密 decryption is plete class MainMenu void StartMenu() throws ExceptionChoose what to do:1Create a directory2Delete a directory3Enter a directory4List a directory5Copy a file6Copy a directory7Encrypt a file0Exit Scanner s=new Scanner(System.in); int a=s.

10、nextInt(); while(true) switch(a) case 1:you choose 1 new CreateFile(); break; case 2:you choose 2input the directory name that you want to delete: File pathtodele=new File(s.next(); if(pathtodele.exists() DeleteFile DeleteDirectory=new DeleteFile(pathtodele); DeleteDirectory.Delete(DeleteDirectory.p

11、ath); DeleteDirectory.Success();Cannot find the directory:+pathtodele); break; case 3:you choose 3input the directory that you want to enter: String pathtoenter=s.next(); new EnterDirectory(pathtoenter); case 4:you choose 4input the directory name that you want to list: String pathtolist=s.next(); n

12、ew ListDirectory(pathtolist); case 5:you choose 5input the source file and the target file: String sourcef=s.next(); String destf=s.next(); new CopyFile(sourcef,destf); case 6:you choose 6 CopyDirectory copydirectory= new CopyDirectory();input the source directory: String sourcedir=s.next();input th

13、e target directory: String destdir=s.next(); copydirectory.copyFolder(sourcedir,destdir); copydirectory.Success(); case 7:you choose 7 TestDES testdes=new TestDES(); testdes.DES(); case 0:you choose to exit System.exit(0); default:error a=s.nextInt();四、实验结果及分析和(或)源程序调试过程备注:1、教师在布置需撰写实验报告的实验前,应先将报告书上

14、的“实验题目”、“实验性质”、“实验目的”、“实验项目容”等项目填写完成,然后再下发给学生。2、教师在布置需撰写报告的实验项目时,应告知学生提交实验报告的最后期限。3、学生应按照要求正确地撰写实验报告:1)在实验报告上正确地填写“实验时间”、“实验地点”等栏目。2)将实验所涉及的源程序文件容(实验操作步骤或者算法)填写在“实验过程或算法(源程序)”栏目中。3)将实验所涉及源程序调试过程(输入数据和输出结果)或者实验的分析容填写在“实验结果及分析和(或)源程序调试过程”栏目中。4)在实验报告页脚的“报告创建时间:”处插入完成实验报告时的日期和时间。5)学生将每个实验完成后,按实验要求的文件名通过

15、网络提交(上载)到指定的服务器所规定的共享文件夹中。每个实验一个电子文档,如果实验中有多个电子文档(如源程序或图形等),则用WinRAR压缩成一个压缩包文档提交,压缩包文件名同实验报告文件名(见下条)。6)提交的实验报告电子文档命名为:“组号(2位数字)年级(两位数字不要“级”字)专业(缩写:计算机科学与技术专业(计科)、网络工程专业(网络)、信息安全专业(信息)、物联网工程(物联网)项目组成员(学号(八位数字)实验序号(一位数字)doc。如第1组完成第1个Project,专业为“计算机科学与技术”专业,项目组成员有:三(学号20115676),四(学号20115676),王五(学号20115

16、676),完成的课程设计报告命名为:01_10计科_20115676三_20115676四_20115676王五1.doc,以后几次实验的报告名称以此类推。4、教师(或助教)在评价学生实验时,应根据其提交的其他实验相关资料(例如源程序文件等)对实验报告进行仔细评价。评价后应完成的项目有:1)在“成绩”栏中填写实验成绩。每个项目的实验成绩按照五级制(优、良、中、及格、不及格)方式评分,实验总成绩则通过计算每个项目得分的平均值获得(平均值计算时需将五级制转换为百分制优=95、良=85、中=75、及格=65、不及格=55)。2)在“教师评价”栏中用符号标注评价项目结果(用表示正确,用表示错误,用表示 半对半错)。3)在“教师评价”栏中“评价教师签名”填写评价教师(或助教)。将评价后的实验报告转换为PDF格式文件归档。4)课程实验环节结束后,任课教师将自己教学班的实验报告文件夹进行清理。在提交文件夹中,文件总数为实验次数教学班学生人数(如,教学班人数为90人,实验项目为5,其文件数为:905=450)。任课教师一定要认真清理,总数相符,否则学生该实验项目不能得分。最后将学生提交的实验报告刻光盘连同实验成绩一起放入试卷袋存档。

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1