Package com.visionarysoftwaresolutions.hfdpch2.bookstyle.weatherstation

Examples of com.visionarysoftwaresolutions.hfdpch2.bookstyle.weatherstation.Display


    //the user's choice, but if I were doing this program for real then that would be
    //handled by some other class say, WeatherStationSetUp
    //That class would get the displays to be used, and add them a list
    //as I've done, and pass that list to this program
   
    Display firstDisplay = new Display(new CurrentConditions(weatherData));
    Display secondDisplay = new Display(new Forecast(weatherData));
    displaysToUse.add(firstDisplay.getCurrentDisplay());
    displaysToUse.add(secondDisplay.getCurrentDisplay());
    weatherData.addDisplay(displaysToUse);
   
View Full Code Here


  public static void main(String[] args){
   
    //And the books implementation of the Observer method is not as flexible as mine
    //You can't select what displays to show at runtime, it just displays what is programmed in
   
    CurrentConditions currentDisplay = new CurrentConditions(weatherData);
    weatherData.setMeasurements(80, 65, 30.4f);
    weatherData.setMeasurements(82, 70, 29.2f);
    weatherData.setMeasurements(78, 90, 29.2f);
   
    weatherData.deleteObserver(currentDisplay);
View Full Code Here

  public static void main(String[] args){
   
    //And the books implementation of the Observer method is not as flexible as mine
    //You can't select what displays to show beforehand, it just displays what is programmed in
   
    CurrentConditions currentDisplay = new CurrentConditions(weatherData);
    Forecast forecastDisplay = new Forecast(weatherData);
    weatherData.setMeasurements(80, 65, 30.4f);
    weatherData.setMeasurements(82, 70, 29.2f);
    weatherData.setMeasurements(78, 90, 29.2f);
   
View Full Code Here

    //the user's choice, but if I were doing this program for real then that would be
    //handled by some other class say, WeatherStationSetUp
    //That class would get the displays to be used, and add them a list
    //as I've done, and pass that list to this program
   
    Display firstDisplay = new Display(new CurrentConditions(weatherData));
    displaysToUse.add(firstDisplay.getCurrentDisplay());
   
    weatherData.addDisplay(displaysToUse);
   
    weatherData.setMeasurements(80, 65, 30.4f);
View Full Code Here

    //the user's choice, but if I were doing this program for real then that would be
    //handled by some other class say, WeatherStationSetUp
    //That class would get the displays to be used, and add them a list
    //as I've done, and pass that list to this program
   
    Display firstDisplay = new Display(new CurrentConditions(weatherData));
    Display secondDisplay = new Display(new Forecast(weatherData));
    displaysToUse.add(firstDisplay.getCurrentDisplay());
    displaysToUse.add(secondDisplay.getCurrentDisplay());
    weatherData.addDisplay(displaysToUse);
   
    weatherData.setMeasurements(80, 65, 30.4f);
    weatherData.setMeasurements(82, 70, 29.2f);
    weatherData.setMeasurements(78, 90, 29.2f);
View Full Code Here

    //the user's choice, but if I were doing this program for real then that would be
    //handled by some other class say, WeatherStationSetUp
    //That class would get the displays to be used, and add them a list
    //as I've done, and pass that list to this program
   
    Display firstDisplay = new Display(new CurrentConditions(weatherData));
    displaysToUse.add(firstDisplay.getCurrentDisplay());
   
    weatherData.addDisplay(displaysToUse);
   
    weatherData.setMeasurements(80, 65, 30.4f);
    weatherData.setMeasurements(82, 70, 29.2f);
    weatherData.setMeasurements(78, 90, 29.2f);
   
    weatherData.deleteObserver(firstDisplay.getCurrentDisplay());
    weatherData.setMeasurements(90, 60, 32.5f);
    weatherData.setMeasurements(95, 75, 29.2f);
    weatherData.setMeasurements(100, 90, 18.5f);

  }
View Full Code Here

    //handled by some other class say, WeatherStationSetUp
    //That class would get the displays to be used, and add them a list
    //as I've done, and pass that list to this program
   
    Display firstDisplay = new Display(new CurrentConditions(weatherData));
    Display secondDisplay = new Display(new Forecast(weatherData));
    displaysToUse.add(firstDisplay.getCurrentDisplay());
    displaysToUse.add(secondDisplay.getCurrentDisplay());
    weatherData.addDisplay(displaysToUse);
   
    weatherData.setMeasurements(80, 65, 30.4f);
View Full Code Here

   
    //And the books implementation of the Observer method is not as flexible as mine
    //You can't select what displays to show beforehand, it just displays what is programmed in
   
    CurrentConditions currentDisplay = new CurrentConditions(weatherData);
    Forecast forecastDisplay = new Forecast(weatherData);
    weatherData.setMeasurements(80, 65, 30.4f);
    weatherData.setMeasurements(82, 70, 29.2f);
    weatherData.setMeasurements(78, 90, 29.2f);
   
    weatherData.deleteObserver(currentDisplay);
View Full Code Here

  public static void main(String[] args){
   
    //And the books implementation of the Observer method is not as flexible as mine
    //You can't select what displays to show at runtime, it just displays what is programmed in
   
    CurrentConditionsDisplay currentDisplay = new CurrentConditionsDisplay(weatherData);
    weatherData.setMeasurements(80, 65, 30.4f);
    weatherData.setMeasurements(82, 70, 29.2f);
    weatherData.setMeasurements(78, 90, 29.2f);
   
    weatherData.deleteObserver(currentDisplay);
View Full Code Here

  public static void main(String[] args){
   
    //And the books implementation of the Observer method is not as flexible as mine
    //You can't select what displays to show beforehand, it just displays what is programmed in
   
    CurrentConditionsDisplay currentDisplay = new CurrentConditionsDisplay(weatherData);
    ForecastDisplay forecastDisplay = new ForecastDisplay(weatherData);
    weatherData.setMeasurements(80, 65, 30.4f);
    weatherData.setMeasurements(82, 70, 29.2f);
    weatherData.setMeasurements(78, 90, 29.2f);
   
View Full Code Here

TOP

Related Classes of com.visionarysoftwaresolutions.hfdpch2.bookstyle.weatherstation.Display

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.