Write a simple Java program to calculate the average daily temperature from the given daily temperatures for a week and then the high temperature for the week.  The program then calculates the number...


Write a simple Java program to calculate the average daily temperature from the given daily temperatures for a week and then the high temperature for the week.  The program then calculates the number of days the temperature is above average.  Be sure to include the following:


1.


o    A class header with a class named Temperature.


o    A main method.


o    Declare the week’s temperature as an array of type double (in a single line) and name the array as temp.  Initialize the array with: 80, 85, 86.7, 90, 87, 95, 98


o    Declare and initialize any other necessary variables.


o    Use appropriate loop statement.


o    Display all the output appropriately.


o    Use System.out.println to do all the printing in this program.


Be sure to import the appropriate package for the Scanner class in your program.  Your program must be syntactically correct and ready to run.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here