ca1358
asked on
Learning Java ColdWeatherDay
Any suggestions that would get this run , I would greatlya appreciated it.
************************** *******
package coldweathertester;
public class ColdWeatherDay
{
public ColdWeatherDay(double inittemp, double initvelocity)
{
{
temp = inittemp;
velocity = initvelocity;
}
// public double getTemperature()
// {
// }
public double getVelocity()
{
return velocity;
}
public void changeVelocity(double newSpeed)
{
}
public findWindChill()
{
double windchill = 35.74 + 0.6215*t + (0.4275*t - 35.75) * Math.pow(v, 0.16);
return windchill;
}
private double temp;
private double velocity;
private double windchill;
}
}
************************** ******
package coldweathertester;
import javax.swing.JOptionPane;
public class ColdWeatherTester
{
public static void main(String[] args)
{
double temp = 5.0;
double velocity = 10.0;
ColdWeatherDay day = new ColdWeatherDay(temp, velocity);
System.out.println("Wind Speed: " + day.getVelocity());
System.out.println("Temp is: " + day.findWindChill());
//Add Code that prompts the user to enter a new wind speed
// and then changes the wind speed of the day to the value entered.
input = JOptionPane.showInputDialo g("Enter in a new wind speed");
temp = Double.parseDouble(input);
System.out.println("Wind Speed: " + day.getVelocity());
System.out.println("Temp is: " + day.getfindWindChill);
}
}
**************************
package coldweathertester;
public class ColdWeatherDay
{
public ColdWeatherDay(double inittemp, double initvelocity)
{
{
temp = inittemp;
velocity = initvelocity;
}
// public double getTemperature()
// {
// }
public double getVelocity()
{
return velocity;
}
public void changeVelocity(double newSpeed)
{
}
public findWindChill()
{
double windchill = 35.74 + 0.6215*t + (0.4275*t - 35.75) * Math.pow(v, 0.16);
return windchill;
}
private double temp;
private double velocity;
private double windchill;
}
}
**************************
package coldweathertester;
import javax.swing.JOptionPane;
public class ColdWeatherTester
{
public static void main(String[] args)
{
double temp = 5.0;
double velocity = 10.0;
ColdWeatherDay day = new ColdWeatherDay(temp, velocity);
System.out.println("Wind Speed: " + day.getVelocity());
System.out.println("Temp is: " + day.findWindChill());
//Add Code that prompts the user to enter a new wind speed
// and then changes the wind speed of the day to the value entered.
input = JOptionPane.showInputDialo
temp = Double.parseDouble(input);
System.out.println("Wind Speed: " + day.getVelocity());
System.out.println("Temp is: " + day.getfindWindChill);
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:-)
ASKER
I will close this question, I have been at this 8 hours and since I am onlly going to be gettng 3 hours of sleep before I have to go to work.
I appreciated you time very much!!