Java code help please:- package toBeCompleted.stage3; import java.util.*; import toBeCompleted.stage

Java code help please:- package toBeCompleted.stage3; import java.util.*; import toBeCompleted.stage1.Assessment; import toBeCompleted.stage2.GradebookEntry; public class Gradebook { private ArrayList assessments; private ArrayList records; /** * DO NOT MODIFY * @return number of records */ public int numberOfRecords() { return records.size(); } /** * DO NOT MODIFY * @return number of assessments */ public int numberOfAssessments() { return assessments.size(); } /** * DO NOT MODIFY */ public String toString() { String header1 = “Asssessment title: t”; String header2 = “Asssessment worth: t”; double totalWorth = 0; for(Assessment a: assessments) { header1 = header1 + a.getTitle() + “t”; header2 = header2 + “(” + a.getWorth() + “)t”; totalWorth += a.getWorth(); } header2 = header2 + “(Total “+totalWorth+”)”; String data = records.toString(); data = data.replace(“[“, “”); data = data.replace(“]”, “”); data = data.replaceAll(“, “, “”); return header1+”n”+header2+”n”+data; } /** * make a deep copy of the parameters into the instancevariables * @param c * @param r */ public Gradebook(ArrayList c,ArrayList r) { //to be completed } /** * * @param recordNumber * @return true if the given record number is valid. * For example, if there are 9 records, valid record numbers * are from 0 to 8 (including 0 and 8)   */ public boolean isValidRecordNumber(int recordNumber) { return false; //to be completed } /** * * @param assessmentNumber * @return true if assessmentNumber is valid, false otherwise */ public boolean isValidAssessmentNumber(int assessmentNumber){ return false; //to be completed } /** * * @param assessmentTitle * @return how much is the assessment worth. return null ifassessment not found */ public Double getWorth(String assessmentTitle) { return null; //to be completed } /** * sort the records in descending order of totals. * hint: you can use the method compareTo from classGradebookEntry */ public void sortRecords() { //to be completed } /** * * @param title * @return index of assessment with given title. return -1 if nosuch title exists */ public int getAssessmentIndex(String title) { return 0; //to be completed } /** * scale marks of a particular assessment, whose title isprovided * by the given factor (1.2 means increase by 20%, 0.75 meansdecrease by 25%). * note that marks should have an upper bound of what thatparticular assessment is worth, * and a lower bound of 0. Thus, a mark of 4 out of 5, with afactor of 0.5, should become 5 (and not 6). * Similarly, a mark of 2 out of 5, with a factor = -1.5, shouldbecome 0 (and not -1). * do nothing if there is no assessment with the given title * @param title * @param factor */ public void scale(String title, double factor) { //to be completed } /** * D/HD * sort the assessments in ascending order of how much they areworth. * Note that each record should be updated as well. */ public void sortAssessments() { //to be completed } /** * D/HD * set the marks of student with the given name in the assessmentwith the * title of assessmentTitle to given marks * @param name: name of student * @param assessmentTitle: title of assessment * @param marks: marks to be set for the given student andassignment */ public void setMarks(String name, String assessmentTitle, doublemarks) { //to be completed } /** * * @param idx * @return GradebookEntry at given index if index is valid,return null otherwise */ public GradebookEntry getRecord(int idx) { return null; //to be completed } /** * * @param idx * @return Assessment at given index if index is valid, returnnull otherwise */ public Assessment getAssessment(int idx) { return null; //to be completed } /** * * @param name * @param title * @return mark of student with given name in an assessment withgiven title. * return null if no such record exists. */ public Double getMark(String name, String title) { return null; //to be completed } /** * * @param name * @return record for student with given name. return null if nosuch record exists */ public GradebookEntry getRecord(String name) { return null; //to be completed } } . . .

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.