0% found this document useful (0 votes)
7 views2 pages

GPA Program

The document outlines the requirements for a GPA calculation program for a class of students, including reading student data from an input file and presenting a menu for user interaction. It specifies the structure of a Student class, menu options for displaying and changing grades, and calculating GPA based on a defined grading scale. Additionally, it mentions the need to save any changes back to the input file upon program exit and suggests allowing for a flexible number of classes and a more realistic grading scale with pluses and minuses.

Uploaded by

Crvtical
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

GPA Program

The document outlines the requirements for a GPA calculation program for a class of students, including reading student data from an input file and presenting a menu for user interaction. It specifies the structure of a Student class, menu options for displaying and changing grades, and calculating GPA based on a defined grading scale. Additionally, it mentions the need to save any changes back to the input file upon program exit and suggests allowing for a flexible number of classes and a more realistic grading scale with pluses and minuses.

Uploaded by

Crvtical
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

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:

o The number of students in the class at the top


o First Name
o Last Name
o Number of A’s
o Number of B’s
o Number of C’s
o Number of D’s
o Number of F’s

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

Enter the number of the student to access or 0 to exit:

 After they have selected a student, show them the following:

Alex Aardvark’s Grades

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:

Alex Aardvark has 4 A’s.


Alex Aardvark has 2 B’s.
.
.
.

 If they select 2, have them entered the new grades for the student:

How many A’s did Alex Aardvark receive?

How many B’s did Alex Aardvark receive?


.
.
.

 If they select 3, have the program calculate the GPA and display the following:

Alex Aardvark’s GPA is 3.5.

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.

When You’re Finished:

 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:

A+ 4.33 B+ 3.33 C+ 2.33 D+ 1.33


A 4.00 B 3.00 C 2.00 D 1.00
A- 3.67 B- 2.67 C- 1.67 D- .67

You might also like