subject

20.5 ASSIGN LAB 5 "An array of temperatures"
Due: Tues, May 19, midnight. If you submit late or resubmit, you will receive 1 point for each week after the due date above.

Write a Java program that creates an array to store the 7 daily high temperatures - in Fahrenheit - that occurred in San Francisco during the first week of April. Your program will then convert these temperatures to Celsius and print their average in Celsius.

Use the following Fahrenheit temperatures for your user input. Note that your program will use the Scanner to read in the temperatures only, your program will not read in the dates; the dates are there just for your understanding:

1 April : 67.3

2 April : 63.2

3 April : 65.0

4 April : 63.1

5 April : 63.9

6 April : 64.6

7 April : 64.5

Once the Fahrenheit values are all stored in the array, convert them all to Celsius. Use the following formula:

Celsius = (Fahrenheit -32) * (5/9)

Only after the array contains all Celsius temperatures, calculate and print the average Celsius temperature for that week in San Francisco. Use a DecimalFormat object in order to format your output to have just one digit to the right of the decimal point. Define the length of the array as a final int so that it will be easy to change if you need to modify your program later to handle two weeks of temperatures.

Note that your program only prints a single number as its output. That number is the average Celsius temperature for the first week in April. As usual, you will not be able to start writing the Java code until you are able to perform these calculations yourself - without a computer - with pencil, paper and calculator.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:50
What is a rush associated with alcohol?
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Which is the highest level of the hierarchy of needs model? a. humanity b. intrapersonal c. team d. interpersonal
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Font size, font style, and are all aspects of character formatting.
Answers: 2
You know the right answer?
20.5 ASSIGN LAB 5 "An array of temperatures"
Due: Tues, May 19, midnight. If you submit late o...
Questions
question
Mathematics, 09.08.2019 20:20
Questions on the website: 13722363