Question: public class Exercise 0 5 _ Weather { private final static int FREEZING _ TEMPERATURE = 3 2 ; / * GaleForce Meteorologists recently developed

public class Exercise05_Weather {
private final static int FREEZING_TEMPERATURE =32;
/*
GaleForce Meteorologists recently developed a new weather station and need it to perform
some common measurements for reporting.
Note: Assume all temperatures are in Fahrenheit (\deg F) unless otherwise
noted.
*/
/*
GaleForce needs to know the number of days in the upcoming forecast
where the temperature is at or below freezing.
Given an array of high temperatures, count the number of days when
the high temperature is freezing (32\deg F) or below.
Examples:
belowFreezing([33,30,32,37,44,31,41])->3
belowFreezing([-7,-3,19,35,30])->4
belowFreezing([])->0
*/
public int belowFreezing(int[] dailyHighs){
return 0;
}
/*
GaleForce also needs to determine the hottest day when given an upcoming forecast.
Given an array of high temperatures, determine the hottest temperature.
Note: The array of high temperatures is guaranteed to have at least one
element.
Examples:
hottestDay([81,93,94,105,99,95,101,90,89,92])->105
hottestDay([23,24]->24
hottestDay([34,33]->34
hottestDay([55])->55
*/
public int hottestDay(int[] dailyHighs){
return 0;
}
/*
GaleForce discovered an equipment malfunction. Every other reading, starting with the first,
was off by 2 degrees Fahrenheit (\deg F).
Given an array of Fahrenheit temperatures, fix each of the incorrect readings by adding
2 degrees to its current value.
Examples:
fixTemperatures([33,30,32,37,44,31,41])->[35,30,34,37,46,31,43]
fixTemperatures([-7,-33,19,35])->[-5,-33,21,35]
fixTemperatures([-1,0,1]->[1,0,3]
fixTemperatures([-1]->[1]
fixTemperatures([])->[]
*/
public int[] fixTemperatures(int[] temperatures){
return new int[]{};
}
} other similar question on chegg doesnt work so was looking to see a different perspective on the same question (https://www.chegg.com/homework-help/questions-and-answers/public-class-exercise05weather-private-final-static-int-freezingtemperature-32-galeforce-m-q101810058)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!