Write a class GradeData
that is based on two parameters: pointsEarned
and pointsPossible
. The class should include a constructor that accepts those two parameters in that order, and four methods:
getPointsEarned()
returns that value
getPointsPossible()
returns that value
calculatePercentage()
returns a double value as a percentage between 0 and 100
getLetterGrade()
returns a String value based on the result calculated by the .calculatePercentage()
method. Use the following percentage distribution to determine the letter grade:
Write a GradeDataTester
program with a main() method that demonstrates the use of the GradeData
class.