问题描述:
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.
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.
问题解答:
我来补答展开全文阅读