Question detail as show as below:
How to design a simple grading system which able read data of a group of students. The data includes students’ names, nations, and marks of four subjects. This data is stored in a text file created by a text editor (notepad etc.).
The system should display a simple text-based menu of options and operations to be applied to the data. Upon selection of any of these operations, the results are displayed in a proper format. The grading scheme used in this system is:
Mark Grade
----------- --------
90 – 100 A
80 – 89 B
70 – 79 C
60 – 69 D
0 – 59 F
The program should be able to read students data from a data file (input.txt). The format of the data file is shown below.
Note: You must use exactly the same file format as given and the same filename (input.txt), though the data and the number of students can be different.
Felix Fiji 41 40 80 80
Philip Panama 50 50 70 70
Abel Austria 60 95 49 79
Cindy Canada 70 40 91 63
The system should allow the user to view all information, generate the statistics by subject and generate the overall statistics.
When you run the program, you should read all the data from the text file into your program and display the following:
Number of students = 4
All information is loaded from file to program.
Press any key to continue . . .
After that, the first menu to be displayed is:
Main Menu
======================================...
1. View all information
2. Statistics By Subject
3. Edit Data
0. Exit
======================================...
Please input your choice:
When the user presses 1, the system should display all information as shown below:
Name Nation English Math CPP SE Average
-------- -------- ------ ------ ------ ------ ---------
Felix Fiji 41 F 40 F 80 B 80 B 60.25 D
Philip Panama 50 F 50 F 70 C 70 C 60.00 D
Abel Austria 60 D 95 A 49 F 79 C 70.75 C
Cindy Canada 70 C 40 F 91 A 63 D 66.00 D
Press any key to continue . . .
If the user selects 2 from Main Menu, the following sub menu will be displayed:
Statistics by Subject
===========================
1. English
2. Mathematics
3. CPP
4. SE
0. Exit
===========================
Please input your choice:
Upon choosing item 1 to 4, the following sub menu will be displayed:
Statistics of English
======================================...
1. Subject Average
2. % of students below the subject average
3. % of students above the subject average
4. Display list of students based on grade
0. Exit
======================================...
Please input your choice:
Here are some examples of the above operations:
If user chooses 1, the output will be:
Average for English is --> 55.25
Press any key to continue . . .
If user chooses 2, the output will be:
Students below the average of 55.25 for English are:
Felix 41
Philip 50
Press any key to continue . . .
If user chooses 4, the user will be prompted to input a grade:
Please enter a grade (A, B, C, D, E):
Supposed the user input grade ‘C’, all the names of student who obtained grade ‘C’ for this subject will be displayed.
Students who obtained grade ‘C’ for English:
Cindy 70
Press any key to go back to the previous menu ...
p/s:
Class is allowed
No Global Variables are allowed
Thank you for helping ...
really ty
your helping was appreciated...