Пример #1
0
 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;
 }
Пример #2
0
 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;
 }