Answered step by step
Verified Expert Solution
Question
1 Approved Answer
@param other * @return 1 if calling object's total is more than parameter's total * @return -1 if calling object's total is less than parameter's
@param other * @return 1 if calling object's total is more than parameter's total * @return -1 if calling object's total is less than parameter's total @return 0 if calling object's total is equal to parameter's total public int compareTo (GradebookEntry other) { return 0; //to be completed tx @param other @param assessmentBasis: index of assessment on the basis of which comparison is being made * @return null if assessmentBasis is an invalid index (for calling object or parameter object) * @return 1 if calling object's mark in the concerned assessment is more than parameter's mark in the concerned assessment * @return -1 if calling object's mark in the concerned assessment is less than parameter's mark in the concerned assessment * Oreturn 0 if calling object's mark in the concerned assessment is equal to parameter's mark in the concerned assessment public Integer compareTo(GradebookEntry other, int assessmentBasis) f return 0; //to be completed swap marks of the assessments at the two given indices * return without doing anything if either index is invalid @param idx1 * @param idx2 public void swap (int idx1, int idx2) //to be completed E2 *if the assessment number is a valid index, and the mark is in the range [0, maxMark], * set the mark of the given assessment number to the mark supplied @param assessmentNumber @param mark * @param maxMark public void setMarks (int assessmentNumber, double mark, double maxMark) //to be completed
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started