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
- Student ID
- 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
- GPA
- Status (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.txt”
- All the students in the same major together using the same format as input file.
- Calculate and print the total number of students in each major
- Calculate the overall GPA for all students in each major.