public float getMaxTemp(OneDay oneDay) { float max_temp = 0; for (Record record : oneDay.getRecords()) { if (max_temp < record.getBeginTemperature()) max_temp = record.getBeginTemperature(); if (max_temp < record.getEndTemperature()) max_temp = record.getEndTemperature(); } return max_temp; }
public float getMinTemp(OneDay oneDay) { float min_temp = 100; for (Record record : oneDay.getRecords()) { if (min_temp > record.getBeginTemperature()) min_temp = record.getBeginTemperature(); if (min_temp > record.getEndTemperature()) min_temp = record.getEndTemperature(); } return min_temp; }
public float getMinTemp(Record record) { float min_temp = record.getBeginTemperature(); if (min_temp > record.getEndTemperature()) min_temp = record.getEndTemperature(); return min_temp; }
public float getMaxTemp(Record record) { float max_temp = record.getBeginTemperature(); if (max_temp < record.getEndTemperature()) max_temp = record.getEndTemperature(); return max_temp; }