// Program Name
WeatherClient.java
// Course:
CSE 1302J
// Student Name:
Bradley Shedd
// Assignment Number:
Homework 1
// Due Date:
09/7/2010
// Purpose:
This program will calculate when the weather is sunny.
//
It includes a method to check consistency.
//
Also the program converts degrees to celsius.
//
// *******************************************************************
// *******************************************************************
// WeatherClient.java
//
// *******************************************************************
public
class
WeatherClient
{
public
static
void
main( String [] args )
{
WeatherMan
today =
new
WeatherMan();
int
todayWeather = today.getTemp();
String
todaySky = today.getSky();
String todayDate
= today.getDate();
today.consistent();
System.out.println(
"Today's date is: " + todayDate +
"\nSky conditions are " + todaySky);
System.out.println(
"The temperature is: " + todayWeather);
System.out.println(
"70 degrees Fahrenheit is " + today.convert(70) +
" degrees celsius");
WeatherMan
tomorrow =
new
WeatherMan(31,"Sunny!!","1/2/00");
tomorrow.consistent();
int
tomorrowWeather = tomorrow.getTemp();
String
tomorrowSky = tomorrow.getSky();
String
tomorrowDate = tomorrow.getDate();
System.out.println(
"Tomorrow's date is: " + tomorrowDate +
"\nSky conditions are " + tomorrowSky);
System.out.println(
"The temperature is: " + tomorrowWeather);
System.out.println(
"50 degrees Fahrenheit is " + tomorrow.convert(50) +
" degrees celsius");
System.out.println(
"Coded By: Bradley J. Shedd");
}
}