Question: import java.util. * ; public class CourseGradebook extends Gradebook { / / Implementing abstract methods @Override public void setScore ( String assignmentName, Integer studentID, Double

import java.util.*;
public class CourseGradebook extends Gradebook {
// Implementing abstract methods
@Override
public void setScore(String assignmentName, Integer studentID, Double score){
// Your implementation
}
@Override
public double getScore(String assignmentName, Integer studentID){
// Your implementation
return Double.NaN;
}
@Override
public HashMap getAssignmentScores(String assignmentName){
// Your implementation
return new HashMap();
}
@Override
public ArrayList getSortedAssignmentNames(){
// Your implementation
return new ArrayList();
}
@Override
public ArrayList getSortedStudentIDs(){
// Your implementation
return new ArrayList();
}
@Override
public HashMap getStudentScores(Integer studentID){
// Your implementation
return new HashMap();
}
}
The Results as follows: Please help fix: am suck with code to pass.
--- testGetScoreAndSetScore()----
FAIL: getScore("Midterm",11111) returned NaN, but expected is 91.0
---- testGetAssignmentScores()----
Calling getAssignmentScores("Homework 2")
FAIL: getAssignmentScores("Homework 2") returned a map with 0 scores, but the expected map has 11 scores
---- testGetSortedAssignmentNames()----
FAIL: getSortedAssignmentNames()
Expected: [Course project, Final exam, Homework 1, Homework 2, Homework 3, Homework 4, Midterm]
Actual: []
---- testGetSortedStudentIDs()----
FAIL: getSortedStudentIDs()
Expected: [10000,11111,22222,33333,44444,55555,66666,77777,88888,90000,99999]
Actual: []
---- testGetStudentScores()----
Calling getStudentScores(22222)
FAIL: getStudentScores(22222) returned a map with 0 scores, but the expected map has 6 scores
Summary:
testGetScoreAndSetScore(): FAIL
testGetAssignmentScores(): FAIL
testGetSortedAssignmentNames(): FAIL
testGetSortedStudentIDs(): FAIL
testGetStudentScores(): FAIL
import java.util. * ; public class

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 Programming Questions!