The course points equal (gradePoints x credits). Write a program that reads data from a text file that contains a sequence of (letter grade, credits) pairs, and calculates the overall GPA of the student. An example of the input may look something like this:
B- 3
D+ 2
A 3
W 0
C+ 4
B 3
Requirements:
1. Use a method that takes a letter grade and a number of credits as parameters, calculates and returns the points for the course.
2. All input data is read from the file which will be made public a few dates before the due date. The format of the data is: one course per line, with a letter grade (string) and number of credits (integer) for each course, as shown in the example above. Test your program with your own data file.
3. Echo each (letter grade, credit) pair. That is, display the input data in a readable manner.
4. Also display the course points and the cumulative points.
5. Use a method to display the total number of credits and the overall GPA.
Darrien Kamai wrote:I am currently getting the error message java.io.FileNotFoundException: ...
any help would be greatly appreciated as this has me stuck!
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
That is a valuable lesson to learn.Darrien Kamai wrote: . . . more methods instead of 1 really complex one
Darrien Kamai wrote:Ok thanks Winston that helped with the error. As far as a getfile() method i'm really not sure how to do that because my professor hasn't tought it and my book doesn't mention it...
ok finally figured it out, had to make more methods instead of 1 really complex one
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Campbell Ritchie wrote:Did you really say while( f.exists() == false ) ...?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here