QuestionQuestion

How cold is it outside? The temperature alone is not enough to provide the answer. Other factors including the wind speed, relative humidity, and sunshine play important roles in determining coldness outside. In 2001, the National Weather Service implemented the new wind-chill temperature to measure the coldness using temperature and wind speed. The formula is:
twc = 35.74 + 0.6215ta – 35.75v°`¹⁶ + 0.4275tav°`¹⁶
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 temperatures below -58° F or above 41° F.
Write a program that prompts the user to enter a temperature between -58° F and 41°F and a wind speed greater than 2 and display the wind-chill temperature. Use Math.Pow(a, b) to compute v°`¹⁶.
Here is a sample run.
Enter the temperature in Fahrenheit: 5.3
Enter the wind speed in miles per hour: 6
The wind chill index is -5.56707

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

import java.util.Scanner;

public class ProgramNumber3 {
    public static void main(String[] args) {      
      
       Scanner scanner; // input stream
       double ta; // is the outside temperature measured in degrees Fahrenheit
       double v; // the speed measured in miles per hour
       double Twc; // the wind-chill temperature
                        
       scanner = new Scanner(System.in);
       System.out.print("Enter the temperature in Fahrenheit: ");
       ta = scanner.nextDouble();...

By purchasing this solution you'll be able to access the following files:
Solution.java.

$15.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats