
September 14th, 2012, 08:57 PM
|
|
Contributing User
|
|
Join Date: Sep 2012
Posts: 37
Time spent in forums: 11 h 30 sec
Reputation Power: 1
|
|
|
Homework help setting up something
The code isn't correct (I know that much) but here's some info:
I need to pass the temperatures of 80 degrees to 105 degrees through something that lets me know what the heat index is at 40, 60 and 80% humidity.
(Heat Index Temperature = C1 + C2 * Temperate + C3 * humidity + C4 * temperature * humidity + C5 * temperature * temperature
+ C6 * humidity * humidity + C7 * temperature * temperature * humidity + C8 * temperature * humidity * humidity + C9 * temperature * temperature * humidity * humidity)
Here's the basic's of the equation.
And here's the variables:
public static final int MIN_TEMPERATURE = 80; //degrees F
public static final int MAX_TEMPERATURE = 105; //degrees
public static final int LOW_HUMIDITY = 40;
public static final int MED_HUMIDITY = 60;
public static final int HIGH_HUMIDITY = 80;
public static final double C1 = -42.379;
public static final double C2 = 2.04901523;
public static final double C3 = 10.14333127;
public static final double C4 = -0.22475541;
public static final double C5 = -6.83783E10-3;
public static final double C6 = -5.481717E10-2;
public static final double C7 = 1.22874E-3;
public static final double C8 = 8.5282E-4;
public static final double C9 = -1.99E-6;
i've been told I need to use a loop in the main method to call this method with the specified temperature (loop control variable) and
humidity (3 calls in the loop, one for each humidity value).
How should I start going about this?
|