static void Main(string[] args) { var termometer = new Termometer(); var display = new Display(termometer); termometer.SetTemperature(32); Console.ReadKey(); }
public Display(Termometer termometer) { this.termometer = termometer; termometer.AddObserver(this); }