please help me to solve the question

问题描述:

please help me to solve the question
Processing Student Data Base File.
Assume that there is a ‘Students.data’ text file that contains 20 students’ records.Each record is a line with the following structure:
Student last name,blank
Student first name,blank
Year of birth,blank
Home form,blank
Math,blank
Set of marks with a blank after each of it
English,blank
Set of marks with a blank after each of it
Science,blank
Set of marks with a blank after each of it
End of line character
You have to write a program that reads information from the file into two-dimensional String array.Each row of the array contains information about one student.Keep in mind that,since the number of marks for each student is different,different rows might have different number of columns.
Once student array is created,the program should provide the following menu:
1.Find a Student ß displays a student record requested by a user.
2.Display All Recordsß displays in user friendly format information about all students.
3.Home Form ß displays a student list (names only) of a home form requested by a user.
4.Highest Averageß searches for student/students with the highest average mark.Displays their names and average marks.
5.Lowest Averageß searches for student/students with the lowest average mark.Displays their names and average marks.
6.Failing Mathß displays the list of student names who are failing Math with their average Math marks.
7.Failing Englishß displays the list of student names who are failing English with their average English marks.
8.Failing Scienceß displays the list of student names who are failing Science with their average Science marks.
9.Failing Two Subjectsß displays the list of student names who are failing two subjects,subjects’ names,and students’ average marks.
10.Failing Three Subjectsß displays the list of student names who are failing three subjects,subjects’ names,and students’ average marks.
11.Exit.
If a user selects ‘Find a Student’ menu option,the program displays a student record; calculates and provides additional information:total average of all student’s marks,average mark for each subject.
After processing any user request,the program should go to the main menu.
This is your chance to show your skills in breaking down large program into small logically completed methods.If you succeed in this job,you will be able to reuse methods many times,making your program shorter and more manageable.
1个回答 分类:英语 2014-11-11

问题解答:

我来补答
加工学生数据库文件.
假设有一个' students.data '文本文件,其中载有20名学生的纪录.每个记录是一个符合结构如下:
学生姓,空白
学生名字 空白
出生年月,空白
家乡,空白
表格,空白
数学 空白的痕迹,与空白后的每个
英语,空白的痕迹,与空白后,每年的资讯
科技,空白的痕迹,与空白后,各该行结束字符
你必须写 程序,它可以读取资料,从档案成二维字符串数组.每排的阵列包含有关一位学生.记住,由于所涉及的商标为每个学生的情况不同,各行可能有不同数目的栏目.
一旦学生阵列制造,计划应提供以下菜单:
1 .找一名学生ß展示学生记录请求了用户.
2 .显示所有recordsß显示器在用户友好格式了解全体学生.
3 .主页ß形式展示了学生名单(地名)的家中请了用户.
4 .最高averageß搜查学生/学生提供最高的平均分数.展示自己的姓名及平均分数.
5 .最低averageß搜查学生/学生的最低平均分数.展示自己的姓名及平均分数.
6 .否则mathß显示器名单学生姓名人士未有数学与他们的数学平均分数.
7 .否则englishß显示器名单,学生的名字被拖欠的英语与他们的平均英文商标.
8 .否则scienceß显示器名单学生姓名人士未有科学与她们的平均科学分数.
9 .否则两个subjectsß显示器名单,学生的名字被拖欠两个科目,科目的名称,以及学生的平均分.
10 .否则三个subjectsß显示器名单学生姓名人士未有三个科目,科目的名称,以及学生的平均分.
11 .退出.
如果用户选择'找一个学生'菜单,程序显示一个学生记录; 计算,并提供额外资料:总平均所有学生的分数,平均分数为每一科目.
加工后的任何用户的要求,计画要到主菜单.
这是你的机会显示你的技能在打破大型程序变为小逻辑方法完成.如果你成功地进行这一工作,你就能重用方法很多倍,让你的程序更短,更便于管理.
 
 
展开全文阅读
剩余:2000
下一页:绘图
也许感兴趣的知识