Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program Description (5 pts) Indented Code (5 pts) Commented Code (5 pts) User prompted for temperature and wind speed in degree Celsius and km/h, respectively

image text in transcribed
image text in transcribed
image text in transcribed
Program Description (5 pts) Indented Code (5 pts) Commented Code (5 pts) User prompted for temperature and wind speed in degree Celsius and km/h, respectively (10 pts) Formula to convert degree C to degree F (5 pts) Formula to convert km/h to mph (5 pts) Formula to calculate wind chill temperature (10 pts) Code Execution Program Compiles (10 pts) Program Executes without Errors (20 pts) Code Output Program calculates correct result for the test case (10 pts) 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. Uwre 35.74 + 0,6215t-35.75pm1+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: 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 a 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_2

Step: 3

blur-text-image_3

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2019 Wurzburg Germany September 16 20 2019 Proceedings Part 2 Lnai 11907

Authors: Ulf Brefeld ,Elisa Fromont ,Andreas Hotho ,Arno Knobbe ,Marloes Maathuis ,Celine Robardet

1st Edition

3030461467, 978-3030461461

More Books

Students also viewed these Databases questions

Question

What is dividend payout ratio ?

Answered: 1 week ago

Question

Explain the factors affecting dividend policy in detail.

Answered: 1 week ago