how do you save the numbers to the letter grades
You could use a Map. The key is the letter and its value is the numeric value
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
Norm's right - there's a class called Map that you could use, but I suspect that this a bit advanced for your stage of learning, and that your teacher had something more basic in mind. Java has no in-built knowledge of raed letters and numbers, so there's no automatic way to do this, but you can use some if tests, like this (pseudo code, not actual Java syntax!)
if (grade letter is A) number = 4
else if (grade letter is A-) number = 3.67
etc
JamesCherrill
Posting Genius
6,371 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073