For this assignment, you will design and implement a class for calculating the average
of a collection of grades. Your GradeCalculator
class should have the following methods:
void enterGrade(int grade)
int getNumberOfGrades()
int getLowestGrade()
double getAverage()
String getLetterGrade()
getAverage
. A grade of 90+ earns an "A", 80+ earns a "B", 70+ earns a "C", 60+ earns
a "D", and anything less than 60 earns an "F".
Your code should demonstrate good style. The class should have a comment block that describes
its purpose, as well as your name (under @author
) and date (under @version
).
Similarly, each method should have comment
block that describe its behavior as well as any parameters (under @param
) and return
values (under @return
). Sample comments can be found on the
GradeCalculator javadoc page
.
Statements should be consistently indented to highlight structure, and all
method/variable names should be meaningful.