project 108

Job ID: 36352204

Budget: $10 – $30 USD

We are assigned to prepare a report for students in each major, and which major has the highest average GPA, followed by what major has the 2nd highest and…….so on. Write a program that reads the name of 25 students record from an input file name “data.in”.
Each student’s record contains the following information using the indicated format as below:

• Name (first and last)
• Student ID (an integer field)
• Major use the following abbreviations for major:
CS Computer Science
MATH Mathematics
CHEM Chemistry
BOILG Biology
BADMIN Business Administration
IT Industrial Technology
• Number of hours taken (Integer field)
• GPA (Double field)
• Status (2 character, use FR, SO, JU, SE for freshman, sophomore , junior and senior)

Your program is to read this data into a structure, and print to an output file named “student.out” in the following order:
1. The original list
2. All the students in the same major together using the same format as input file.
3. Calculate and print the total number of students in each major
4. Calculate and print the overall GPA for all students in each major.
5. Calculate and print the overall GPA from highest to lowest for each major.
6. Calculate and print the number of students in each major.

Design requirements:
Use functions to open and read data, a function to print data, and a function for performing each task.
Prior to printing each output, print a heading with the full name of the major (i.e. Computer Science). Include an appropriate heading for each item in the report.
Related categories: C Programming C++ Programming