Question: 1 . The temperature alone is not enough to provide the answer of how cold it is outside. In 2 0 0 1 , the

1. The temperature alone is not enough to provide the answer of how cold it is outside. In 2001, the National Weather Service (NWS) implemented the new wind-chill temperature to measure the coldness using temperature and wind speed. The formula is:
twc =35.74+0.6215ta 35.75v0.16+0.4275 tav0.16
Where ta is the outside temperature measured in degrees Fahrenheit and v is the speed measured in miles per hour. Twc is the wind-chill temperature. The formula cannot be used for wind speeds below 2 mph or temperature below -58 oF or above 41 oF.
You may use Math.pow(a, b) to compute v0.16.
Write a java program that prompts the user to enter a temperature and a wind speed. (You may use Scanner class or JOptionPane class for user input.) The program displays the wind-chill temperature if the input is valid; otherwise, it displays a user friendly message indicating whether the temperature and/or wind speed is invalid. Display your message in Window version using JOptionPane class.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!