Question: Java.Write the body for the integer method called daysOfFreezing, given the header and the call in main shown below. Use the constant FREEZING in your

Java.Write the body for the integer method called daysOfFreezing, given the header and the call in main shown below. Use the constant FREEZING in your code.

public class ColdOnes {

const int FREEZING = 32; public static void main(String args[]) { Scanner stdin = new Scanner(System.in); int temperature[31]; System.out.print("Enter the low temperature for 31 days: "); for (int i=0; i < 31; i++) {

temperature[i] = stdin.nextInt();

} System.out.println("Days below freezing: " +daysOfFreezing(temperature)); } public static int daysOfFreezing(int farenheit[]) { // write this method body }

}

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!