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, 21.06.2019 16:40
Match each feature of e-publishing as an advantage, a disadvantage, a threat, or an opportunity. (choices) increased collaboration digitalized out-of-print versions monopoly over digital formats requirement for a specialized digital device pairs advantage of e-publishing disadvantage of e- opportunity for e- threat to e-
Answers: 1
question
Computers and Technology, 22.06.2019 04:30
Which of the statements below is true? the formatting, standard, and drawing commands are unavailable. the formatting, standard, and drawing commands have been used. the formatting, standard, and drawing toolbars are displayed. the formatting, standard, and drawing toolbars are hidden.
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Arecipients list has been loaded into a document. which commands should be clicked in order to filter the list so that letters will not be printed for recipients who live in a certain state? mailings tab, start mail merge, select recipients, type new list, then insert only contacts from the desired states mailings tab, rules, select recipients, use existing list, then choose a recipients list that includes only contacts in certain states mailings tab, select recipients, use existing list, rules, fill in, then type in certain states mailings tab, rules, skip record select “state” under field name, then type in the state name under “equal to”
Answers: 2
question
Computers and Technology, 23.06.2019 02:30
Which component acts as a platform on which application software runs
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, 29.06.2019 06:00
Questions on the website: 13722361