Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Simple Java Question Wind chill. Given the temperaturet (in Fahrenheit) and the wind speed v (in miles per hour), the National Weather Service defines the

Simple Java Question

image text in transcribedimage text in transcribed

Wind chill. Given the temperaturet (in Fahrenheit) and the wind speed v (in miles per hour), the National Weather Service defines the wind chill to be: w = 35.74 + 0.6215 t + (0.4275 t - 35.75) VO. 16 Write a program WindChill.java that takes two double command-line arguments t and v and prints the wind chill. Use Math.pow(a, b) to compute ab. Note: the formula is not valid if t is larger than 50 F or less than-50 F or if v is larger than 110 mph or less than 3 mph public class Windchill { public static double windChill() { return -1; } public static void main(String[] args) { double temp; double windSpeed; double windchillTemp; 11 11 // if the wind chill is valid: System.out.println("For a temperature of + temp. + " with wind speed of + windSpeed + ", the wind chill is + windChillTemp); // if the wind chill is not valid: System.out.println("Cannot calculate a valid wind chill for this temperate and/or wind speed"); 11 } }

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

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions