- System Menu
- Grade
- Inquire
- By index
- By student ID
- Quit
- Sort
- Quit
- Display an order list (Menu) for every function
- Read the parameter inputed by user
- call the correspond sub-function
- ask user to input the assignment index and question(s) amount.
5
meansAssignment 5
- Input the score of every question for every student
- Calculate the total score for the student
- Start the next student
- all students' score save to a file call
marks.txt
Format in file marks.txt
Name ID Assignment1 Assignment2 ......
Tony 1234 3.5 ...
Andrew 1235 3.3 ...
Amy 2323 4 ...
........
Like Search for the student
- Display a order list (sub-Menu)
- Read the parameter inputed by user
- call the correspond sub-function(i.e. "sub-sub-function")
By Index
- ask user to input a index
- output a list with information:
index
andStudent Name
- ask user to input a
index
- ask user to input a
- read the
index
inputed by user - display that student's information (Marks)
By student ID
- ask user to input a student ID
- read the
Student ID
inputed by user - display that student's information (Marks)
Quit
- go back to main menu
This part have special request: use list(链表)
- sort the students’ list (file
students.txt
) according to the total marks for all the assignments. - save the result to
sorted.txt
- output the sorted result to the screen
Format in file students.txt
Name ID
Tony 1234
Andrew 1235
Amy 2323
......
Format in file sorted.txt
Name ID Total
Andrew 1235 15
Amy 2323 12
Tony 1234 11.3
......
- finish all jobs
- quit the system
- There are no more than 20 students in total
- Student's ID is a
4 digits number
and not begin with a0
- Max Assignment amount is
5
- Max questions number in an Assignment is
10
- Marks for each questions are equal
- Letter grades
letter | Grade |
---|---|
A | 4pts |
B | 3pts |
C | 2pts |
D | 1pts |
- The user always give the valid inputs
- Using Main and Sub-functions
- User-friendly
- input notifications