Question: Write a program to compute a GPA from letter grades. In Eclipse, create a package called program1 (note the lowercase first letter), in which you

Write a program to compute a GPA from letter grades. In Eclipse, create a package called program1 (note the lowercase first letter), in which you will create a program called ComputeGPA.

Write the program so that it:

declares and creates a symbol table using the algs31.BinarySearchST class;

fills that symbol table with the following key-value pairs:

Letter Points
A+ 4.33
A 4.00
A- 3.67
B+ 3.33
B 3.00
B- 2.67
C+ 2.33
C 2.00
C- 1.67
D 1.00
F 0.00

reads a sequence of letter grades from a file called a1grades.txt using standard input, that is, using the method fromFile in the class StdIn in the stdlibpackage. As each grade is read, the program accumulates a total number of grade points by using the symbol table to convert a letter grade to a point value;

computes and prints the GPA.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!