Temps.java // This program reads in a sequence of hourly temperature // readings
ID: 674946 • Letter: T
Question
Temps.java // This program reads in a sequence of hourly temperature // readings (beginning with midnight) and prints the maximum // temperature (along with the hour, on a 24-hour clock, it / occurred) and the minimum temperature (along with the hour // it occurred) import java.util.Scanner; public class Temps public static void main (String[] args) final int HOURS_PER_DAY24; Scanner scan new Scanner (System "in); // a temperature reading int temp; int maxTemp = -1000; // the max temp read so far int timeOfMax = 0; int minTemp = 1000; int timeOfMin = 0; // print program heading System.out.println); System.out.println ("Temperature Readings for 24 Hour Period"); System.out.println ); for (int hour 0; hour maxTemp) maxTemp temp; timeOfMax hour; if (tempExplanation / Answer
https://drive.google.com/file/d/0B3lVit8k3iPqZlJobXZDMjFad0k/view?usp=sharing
https://drive.google.com/file/d/0B3lVit8k3iPqSFBZVndQUTJpbW8/view?usp=sharing
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.