Question
File will contain data for students (one student per line) including: Students name (e.g., Mary Jones@) terminated with an @ followed by at least one
File will contain data for students (one student per line) including: Students name (e.g., Mary Jones@) terminated with an @ followed by at least one blank then followed by scores for several quizzes obtained by the student, (e.g., 90 95 80 75 60 85 92 -1). Quiz scores will be separated by one or more blanks or tabs and terminated with a -1 (i.e., 92 is the last score for this student). After the row for the last student in the file, a line with END will be found to signify the end of the students data in the input file.
Your program should read all the data and store it into an array of appropriate structures for each student (assume no more than 50 students in the data file). Also assume no more than 15 quiz scores per student. Your structure should have space to calculate a quiz average computed for each student. To calculate the average for each student, the lowest quiz should be dropped and the average of the rest calculated. For Mary above, data would be: Mary Jones@ 90 95 80 75 60 85 92 -1 and the average should be calculated on only the red grades: 90 95 80 75 60 85 92 average = 86.1667 since the lowest score, 60, should not be included.
After calculating (and storing) all the quiz averages for all students, the program should present the user a menu of options to what information is desired:
- Display student with highest average (Name, all grades and average)
- Display student with lowest average (same as 1)
- Display all students data sorted from highest to lowest average
- Display number of students with 90s, 80s, 70s, 60s and below 60 averages
- Display the class average (Average of students averages)
- Quit (Terminate the program when this is chosen, otherwise present the menu again after displaying appropriate data for choice 1 to 5)
Enter an option 1 6:
PLEASE MAKE AN OPTION MENU, with user input, thank you please in clude screenshots!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started