GPA Program
GPA Program
You will write a program to calculate the GPA for a class of students:
First, copy the input file grades.txt from the groups drive to your Java project.
Then, read in all the information from the input file. It contains:
For simplicity there are no pluses or minuses. Also, each student takes 6 classes.
Define a class called Student that will have all the necessary fields and methods.
In the Client, first present the user with the following menu:
1. Alex Aardvark
2. Bill Bee
3. Curtis Catfish
4. Donald Duck
5. Frankie Fish
1. Show Grades
2. Change Grades
3. Calculate GPA
4. Return to Previous Menu
Enter your choice:
If they select 1, have the program display the following:
If they select 2, have them entered the new grades for the student:
If they select 3, have the program calculate the GPA and display the following:
To calculate their GPA, you must average their total grade points. An A is 4 points, a
B is 3, a C is 2, a D is 1 and an F is 0.
If they select 4, return them to the student menu so they can choose another student to
access.
When they exit the program, write all the information back to the grades.txt file.
That way, if any of the grades have changed, they will be updated the next time the
program runs.
Allow students to take any number of classes they wish, not just 6.
Use a more realistic grading scale with pluses and minuses. The grade points are: