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 15:30
What is a costume plot? why is it important to a film or theater production?
Answers: 2
question
Computers and Technology, 23.06.2019 22:30
Lakendra finished working on her monthly report. in looking it over, she saw that it had large blocks of white space. what steps could lakendra take to reduce the amount of white space?
Answers: 3
question
Computers and Technology, 24.06.2019 19:20
Kiesha has a worksheet with a range of cells using the following columns: name, score, group, study group, and date. kiesha needs to sort the worksheet on the date field. which option she use to most efficiently complete this task ? a use the cut and paste option to reorganize the data to fit that order b use the filter function to organize the data based on the date c use the order function to organize the data based on the date d use the sort function to organize the data based on date order
Answers: 3
question
Computers and Technology, 25.06.2019 01:00
Your computer will organize files into order. alphabetical chronological size no specific
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
Questions on the website: 13722362