java无忧网
标题: 英文作业:IO流读取txt文件,并计算最高分 文件复制 查找 [打印本页]
作者: java无忧网 时间: 2018-11-1 13:16
标题: 英文作业:IO流读取txt文件,并计算最高分 文件复制 查找
Assignment #8
The records of the students enrolled in a hypothetical computer science class, along with all the relevant information, are kept in the data file classLis.txt
Design and implement a java application to facilitate access to the student records.
The following is a screen sample of the program:
Please enter:
1. To display a specific student’s record.
2. To calculate the final exam average.
3. To find a student with the highest score on the final exam.
4. To copy the students’ record to another file.
5. To terminate the program.
1
Please enter the student’s name: Annette Adams
Name: Annette Adams
ID: 18273640
Final: 98
Please enter:
1. To display a specific student’s record.
2. To calculate the final exam average.
3. To find a student with the highest score on the final exam.
4. To copy the students’ record to another file.
5. To terminate the program.
1
Please enter the student’s name: Mark Smith
No match
Please enter:
1. To display a specific student’s record.
2. To calculate the final exam average.
3. To find a student with the highest score on the final exam.
4. To copy the students’ record to another file.
5. To terminate the program.
2
The final exam average is: 80.43478
Please enter:
1. To display a specific student’s record.
2. To calculate the final exam average.
3. To find a student with the highest score on the final exam.
4. To copy the students’ record to another file.
5. To terminate the program.
3
The student with highest score to the final exam:
Name: Aleksei Titov
ID: 92839443
Final exam score: 99
Please enter:
1. To display a specific student’s record.
2. To calculate the final exam average.
3. To find a student with the highest score on the final exam.
4. To copy the students’ record to another file.
5. To terminate the program.
4
Please enter the file name:
ClassListCopy.txt
Please enter:
1. To display a specific student’s record.
2. To calculate the final exam average.
3. To find a student with the highest score on the final exam.
4. To copy the students’ record to another file.
5. To terminate the program.
5
Program terminates
The classList.txt file has been created for you.
Marking Scheme
[2 marks] Presentation/Style: Organization, readability, descriptive identifier,
indentation, bracket placement
[16 marks] Correctness: Program works without bugs. Use of appropriate methods.
[2 marks] Comments
此源码经过详细测试 保证能运行!!!
下载地址:
**** 本内容需购买 ****
作者: 让行动证明一切 时间: 2018-11-18 14:50
英文作业:IO流读取txt文件,并计算最高分 文件复制 查找
报空指针异常:
Exception in thread "main" java.lang.NullPointerException
at java.io.Reader.<init>(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at a8.main(a8.java:23)
| 欢迎光临 java无忧网 (http://www.javawyw.com/) |
Powered by Discuz! X3.2 |