1) Create a text file students.txt, contains information about an unknown number of students in 230 class as follow:


1150987 87.40 37 82.3 16
1160098 72.82 103 73.8 15
.
.
1161430 68.55 68 85.0 18


Each line contains: student-number , accumulative average so far , total credits taken , average this semester , credits registered this semester.

2) Let the program reads from the file students.txt and computes the final accumulative average for each student as follow:

Final accumulative average =

( ( accumulative average so far * total credits taken ) + (average this semester * credits registered this semester ) ) /
( total credits taken + credits registered this semester )

3) Write a function calculate that.

receives student-number, accumulative average so far, total credits taken, average this semester, credits registered this semester and returns the final accumulative average


4) Display on another text file result.txt the result as shown below:


Student Number Total New Credits finished Final Accumulative Average
-------------------- --------------------------------- -----------------------------------
. . .
. . .
. . .
. .
5) The program should display also the number of students who received an honor (Accumulative Average >=85) and the number of students whose Accumulative Average <=65.