Computers and Technology

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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:30, miguel3maroghi
This technology is used to produce high-quality documents that look good on the computer screen and in print. wiki presentation paint desktop publishing
Answers: 3
image
Computers and Technology, 23.06.2019 07:30, jackie0833
Which option allows you to view slides on the full computer screen?
Answers: 1
image
Computers and Technology, 24.06.2019 00:40, sierravick123owr441
Use a software program or a graphing utility with matrix capabilities to solve the system of linear equations using an inverse matrix. x1 + 2x2 − x3 + 3x4 − x5 = 6 x1 − 3x2 + x3 + 2x4 − x5 = −6 2x1 + x2 + x3 − 3x4 + x5 = 3 x1 − x2 + 2x3 + x4 − x5 = −3 2x1 + x2 − x3 + 2x4 + x5 = 5
Answers: 3
image
Computers and Technology, 24.06.2019 08:30, daskatingpanda
Formatting rows and columns is similar to cell formatting. in an openoffice calc spreadsheet, you can format data entered into rows and columns with the of the rows and columns options. you can insert rows and columns into, or delete rows and columns from, a spreadsheet. use the insert or delete rows and columns option on the insert tab. alternatively, select the row or column where you want new rows or columns to appear, right-click, and select insert only row or only column options. you can hide or show rows and columns in a spreadsheet. use the hide or show option on the format tab. for example, to hide a row, first select the row, then choose the insert tab, then select the row option, and then select hide. alternatively, you can select the row or columns, right-click, and select the hide or show option. you can adjust the height of rows and width of columns. select row and then select the height option on the format tab. similarly, select column, then select the width option on the format tab. alternatively, you can hold the mouse on the row and column divider, and drag the double arrow to the position. you can also use the autofit option on the table tab to resize rows and columns.
Answers: 1
Do you know the correct answer?
20.5 ASSIGN LAB 5 "An array of temperatures"
Due: Tues, May 19, midnight. If you submit late o...

Questions in other subjects:

Konu
Mathematics, 18.12.2020 03:20