Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How cold is it outside? The temperature alone is not enough to provide the answer. Other factors, including wind speed, relative humidity, and sunshine play

image text in transcribed
image text in transcribed
How cold is it outside? The temperature alone is not enough to provide the answer. Other factors, including wind speed, relative humidity, and sunshine play important roles in determining coldness outside. In 2001, the National Weather Service (NWS) implemented the new wind-chill temperature to measure the coldness using temperature and wind speed.1 Uwre 35.74 +0,6215t-35.75m1+04275ty014 where twc is the wind chill temperature, t is the outside temperature measured in degree Fahrenheit ( ), and v is the wind speed measured in miles per hour (mph)'The formula assumes that the temperature is between -58 F and 41 F, and the wind speed is greater than 2 mph. For program 1, write an application that inputs the outside temperature in degree Celsius (C), and the wind speed in kilometers per hour (km/h), and outputs the wind chill and wind chill temperature in F Notice that in order to use the above formula, you must convert the input temperature from Celsius to Fahrenheit and input speed from km/h to mph (check page 2 for details). Input outside temperature, t (c) . wind speed, v (km/h) Output wind chill temperature (F) Sample Output Enter the temperature in Celsius: -14.83 Enter the wind speed in kilometers per hour:9.6 Temperature:5.386808888088e1 degree F but feels like -5.559922876676512 degree F 2. Before each significant step, provide a comment explaining the step (do not comment every line of code). 3. You must read the temperature in as C and convert it to F using the following formula: FC +32 5 Hint: How does Java actually evaluate 9/5? It is not what you necessarily think! Make sure your formula correctly calculates this temperature conversion. 4. You must read in the wind speed in km/h and convert to mph using the following formula: 1 mile 1.6 kilometers 5. You must use Math.pow(a,b) to determine an exponent. In this case ab is calculated, but you should use different variable names than a and b. 6. Output the wind chill temperature in F (if you can use System.out.printf to keep 2 decimal places, that'll be great), in this case, the sample output looks like: Sample Output Enter the temperature in Celsius:-14.83 Enter the wind speed in kilometers per hour: 9.6 Temperature: 5.31 degree F but feels like -5.56 degree F

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions