Sort of. Instead of computing the sumOfGrades in the fillArray method, compute it in the average method. Then divide by the of grades you have (hint: grades.length)
The compile error you're...
Type: Posts; User: helloworld922
Sort of. Instead of computing the sumOfGrades in the fillArray method, compute it in the average method. Then divide by the of grades you have (hint: grades.length)
The compile error you're...
That's the reason why we are using static methods here: because the clerk object for all intensive purposes is only taking up space to allow us to call methods that act statically (aka. they don't...
hmm.. it looks like all your methods are asking users for grades rather than actually passing along previously entered values.
To pass parameters to a method, put the parameter type and the name...
You don't need to re-declare each int in the array grades[] (it's understood that they must be int's).
int[] grades = new grades[howManyGrades];
for (int i = 0; i < howManyGrades]; i++)
{
...