Project #5
(NSM Senior Stats)
(Due 13 April 07)
A file named NSMseniors.txt contains some basic information about students in the College of Natural Science and Mathematics who are planning to graduate in December 2007. This file can be found on the I: drive at I:\jlwolfe\110\NSMseniors.txt The information consists of one line for each student in the following form:
Lastname, Firstname Major No-IUP-credits No-transfer-credits Quality-points
The student information is held in the file in alphabetical order, based on the student's names. Here are the first few lines of the file:
Alligator, Albert
GEOS 92 0 223
Arbuckle, Jon
COSC 100 0 268
Bailey, Beetle
COSC 99 7 250
Blossom, Auntie
BIOL 117 0 328
Unfortunately, it has been discovered that three students have been omitted from the file and need to be added. In addition, several pieces of statistical information based on the content of the file are needed. You are to write a program that performs all of the following actions:
Name
Major IUP Credits Transfer Quality Pts
Smith, Mabel
COSC 104
16 258
Adams, Douglas
PSYC 101
0 287
Halftrack, Martha CHEM
97 0
264
These students need to be added into the
list of students in the proper locations, so that the list remains in
alphabetical order.
Hand in a printout of your well documented program and a printout showing the displays specified above. Also, copy both the .cpp file for this program and the update file to the handin folder on the P: drive. Be sure the .cpp file is named after you. If your program does any of the following extra credit tasks, the printout showing results must show the associated extra credit display too.
Extra Credit Possibilities:
Display the name and GPA of the student in each major that has the highest GPA for students in that major. This display should show the major, student name and GPA.
Display the average number of transfer credits a student has, consider all students.
Display the overall grade point average for all of the seniors. This is the sum of their quality points divided by the sum of their IUP credits.
You need to get the overall GPA in order to try this next one. Determine the uniformity of the senior class by selecting every fifth senior and calculating the GPA and average number of credits for this subset. Display the subset GPA, overall GPA, and average number of credits for the subset.
If you do any of the extra credit tasks,
each of them must also be done using a function.