WY5V8181 HR (a) public double getCompoundAvg(String comp){ int ct = 0; double totalTemp = 0; for (Trial trial : trialList){ if (trial.getCompound() != comp) continue; ct++; totalTemp += trial.getTemp(); } if (ct > 0) return totalTemp/ct; else return -1; } (b) public String getCompoundWithHighestAvg(){ double max = -1; // less than all non-negative temperatures. String compound; for (String curCompound : getCompoundList()){ double avg = getCompoundAvg(curCompound); if (avg > max){ max = avg; compound = curCompound; } } return compound; } (c) The programmer would need to add the amount of compound used as a private instance variable (with a getter) in Trial (which would be initialized in its constructor). ScienceExperiment would hold the method `public double getCompoundAmountUsed(String compoundName)` which would sum, for all Trials in trialList with the same compoundName as given, the value of trial.getAmountUsed(), and return that value.