# A Problem Solved: Wind Chill

In this lesson, we will design and implement a Java solution to a mathematical problem.

## We'll cover the following

## Problem statement

The effect of wind on the human body can make one feel colder than the air temperature might suggest. The combined effect of wind and temperature is called the *wind-chill temperature*. Suppose that the National Weather Service wants you to write a Java program to compute the wind-chill temperature given the air temperature and wind velocity.

## Discussion

According to the U.S. National Weather Service, the wind chill temperature is calculated by the following formula:

*W* = *c*_{1} + *c*_{2} × *T* – *c*_{3} × *V*^{0.16} + *c*_{4} × *T* × *V*^{0.16}

where *T* is the current air temperature in degrees Fahrenheit, *V* is the velocity of the wind in miles per hour, *c*_{1} is `35.74`

, c_{2} is `0.6215`

, c_{3} is `35.75`

, and c_{4} is `0.4275`

.

When wind speeds are less than `3`

miles per hour, the previous formula will give you a wind chill that is higher than the actual temperature. When you are standing still in a light breeze, your body warms the air near you. This warm air insulates your body somewhat from the colder environment. As a result, it may actually feel warmer than the actual temperature.

## The program

The program given below evaluates the wind-chill formula. Before we look at the details of the program, run it for a temperature of `35`

degrees Fahrenheit and a wind speed of `5`

miles per hour. The result should be a wind chill of `31`

degrees.

Get hands-on with 1400+ tech skills courses.