Program 3
Wind Chill Calculator
Overview: In this program you will design and create a
Wind Chill Calculator. This calculator will allow the user to compute the Wind
Chill for a given Air Temperature (T) and Wind Speed (S). It is important to
note that the Air Temperature must be less than 50ºF for the temperature
to be adjusted due to wind chill. In addition, Wind Speed must be greater
than 3 mph to cause wind chill. If the temperature is 50ºF or above, the
wind chill is the air temperature. Wind speeds of 3 mph or less do not create a
wind chill effect, so the wind chill is the same as the air temperature.
Requirements:
a.
Create a solution structure using
the name WindChillCalculator. The project consists of a single form, named
frmWIndChillCalculator. Set appropriate properties for the form so it acts as a
dialog.
b.
Design an interface that conforms to
interface design guidelines that can accept input for the Air Temperature and
Wind Speed and provides output for the Wind Chill. Provide guidance on what
to enter where necessary for the user, but guidance should employ the minimum
necessary text.
c.
Your interface should provide means
for the user to initiate calculation of the Wind Chill and for the user to exit
the application.
d.
You should declare variables of an
appropriate datatype and scope to represent the values to be used in the
calculations. Follow conventions in naming your variables.
e.
The various relationships between
the values are shown in the following table:
|
Value: |
Formula: |
|
Wind Chill = |
T where S <= 3 mph |
|
Wind Chill = |
T where T => 50ºF |
|
Wind Chill = |
35.74 + 0.6215 * T - 35.75 *
(S^0.16) + 0.4275 * T * (S^0.16) where T < 50ºF and S > 3 mph. |
|
T = Air Temperature in ºF and S =
Wind Speed in m.p.h. |
|
f.
Write code that takes the values
input at the interface and converts them to the appropriate datatype. Perform
the calculations to determine Wind Chill. Output the Wind Chill to the
Interface formatted to one decimal place.
g.
The Wind Chill output should be very
prominent.
h.
Ensure that the user moves
effortlessly through the data entry and calculation and can do this from the
keyboard. Make use of the TabIndex property and the properties of the form and
buttons to achieve this.
i.
Test your code. For an Air
Temperature of 0ºF and a wind speed of 30 mph the Wind Chill should be -25.9ºF.
Test the interface: will the user know what is required for each data input?
j.
Add a "Time to Frostbite"
indicator to your application. If the wind chill is lower than -17ºF, frostbite
occurs in 30 minutes, if the wind chill is lower than - 35ºF, frostbite occurs
in 10 minutes and if the wind chill is lower than -60ºF, frostbite occurs in 5
minutes.
k.
You are required to document the
code, i.e., provide a brief description of what it is doing in business terms.
Deliverable: Copy your solution structure to your account on
the W: Drive.
Grading:
Layout
follows interface design principles
20 pts
Object/variable
naming conventions followed 15 pts
Correct
code (it works as intended)
40 pts
Frostbite
Indicator 10
pts
Code
documented
10 pts
Files
named correctly
5 pts
Total 100
pts
Due Date: Beginning of class, Tuesday, April 1, 2008