I'm not good at programming so would you help me with this?! No fancy codes, just make it simple.
For research purposes and to better help students, the admissions office of my college wants to compare how well female and male students perform in certain courses. You are asked to write a program that reads student records from an input file. Each student record will consists of two data items: (a) the student’s sex (‘f’ for female, ‘m’ for male) and (b) the student’s GPA (a number in the range of 0.0 – 4.0).
Assume that the length of the input file is unknown. Therefore, the program should continue processing student records until the end of file is reached.
The program should tabulate the following information:
- total number of female students
- average female student’s GPA
- total number of male students
- average male student’s GPA
- total number of students
- overall student GPA (males and females combined)
A sample input file is shown below, followed by a sample screen shot of the program’s output. Your program should format its screen output as shown in this sample report. Note that GPA values should be written to two decimal places.
Sample Input File (student_data.txt)
Sample Program Output (user input is in italics):
Female Students....... 5
Female Avg GPA ....... 3.46
Male students ........ 4
Male Avg GPA ......... 2.96
Overall Avg GPA ...... 3.24
Thanks in advance,