Question: Java We have written the following Gradebook interface: interface Gradebook { public double getAverage(); TASK: Create a class called SimpleGradebook that has the following properties:

JavaJava We have written the following Gradebook interface: interface Gradebook { public

We have written the following Gradebook interface: interface Gradebook { public double getAverage(); TASK: Create a class called SimpleGradebook that has the following properties: It must implement the Gradebook interface It should have a private ArrayList instance variable grades to store the grades It must have a public no-parameter constructor that initializes grades to an empty ArrayList It must have a public instance method addGrade that has one double parameter grade and a return type of boolean. If grade is valid (i.e., 0 s grade s 100), it should add grade to the grades instance variable and return true; otherwise, it should just return false and do nothing else It must have a public no-parameter instance method getAverage that returns the average of the grades in the grades member variable as a double

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!