Exemplo n.º 1
0
        /// <summary>
        /// ObserverFunction as a function
        /// </summary>
        public void ObserverFunction()
        {
            WheatherStation station         = new WheatherStation();
            PhoneDisplay    phoneDisplay    = new PhoneDisplay(station);
            ComputerDisplay computerDisplay = new ComputerDisplay(station);

            phoneDisplay.Update();
            computerDisplay.Update();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PhoneDisplay"/> class.
 /// </summary>
 /// <param name="weatherStation">weatherStation as a parameter</param>
 public PhoneDisplay(WheatherStation weatherStation)
 {
     this.wheatherStation = weatherStation;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ComputerDisplay"/> class.
 /// </summary>
 /// <param name="wheatherStation">weatherStation as a parameter</param>
 public ComputerDisplay(WheatherStation wheatherStation)
 {
     this.wheatherStation = wheatherStation;
 }