Question: You are to write a C++ program that will read in up to 15 students with student information and grades. Your program will compute an
You are to write a C++ program that will read in up to 15 students with student information and grades. Your program will compute an average and print out certain reports.
Note: Must use structures, arrays, and functions
The professor wants fresh new code and comments so he can read easily what each part and function does.
Format: The information for each student in on separate lines of input. The first data will be the students ID number, next the students classification, next line is the students name and the last line are the 9 grades where the last grade is a final and is to be counted twice.
Read in the students, compute their averages and print out the following reports:
Print out each student ID and their average.
Print out all the Seniors in a list with their name and average.
Print out all the Juniors in a list with their name an average.
Sort the students on ID and print out ID and average.
Print out the class average, (average of the averages.)
Be sure to label each list and line up all output in straight columns. (No waves)
Input file is on blackboard: NameStruct.txt
Example of inputs are given below.
Example input
12345
Junior
tom archer jones
89 90 95 90 95 100 85 90 95
51321
Senior
dewy luewey
90 95 100 100 95 95 95 100 95
The Namestruct.txt file looks like this:
12345 Junior Two B Orknot 85 68 85 84 95 100 86 87 85 81032 Senior Mack Camp 77 73 77 79 80 73 76 73 78 71433 Senior Cant Never Koud 88 89 83 80 93 95 97 99 100 55231 Junior Two N Finitee 95 95 100 85 85 70 85 90 85 18382 Junior Eve N Ghigher 100 100 100 100 100 100 100 100 100 74223 Senior Tow Jammer 93 88 77 66 77 86 89 95 92 45322 Senior Uh Nuther 95 90 85 80 70 80 85 90 85 82843 Senior Lue Knew Lotts 98 99 97 100 100 99 96 96 97 39932 Junior Ah C Moto 65 67 70 77 73 69 70 66 67 81399 Junior Too Much 83 84 88 77 88 88 73 75 80 99392 Senior Just Abot Done 75 80 77 77 77 80 82 79 80 13929 Senior Al Dah Zame 90 90 90 90 90 90 90 90 90 72221 Junior Tu Phinish Awf 100 95 90 85 80 75 70 65 60
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
