public void Run( ) { // create a new clock Clock theClock = new Clock( ); // create the display and tell it to // subscribe to the clock just created DisplayClock dc = new DisplayClock( ); dc.Subscribe(theClock); // create a Log object and tell it // to subscribe to the clock LogCurrentTime lct = new LogCurrentTime( ); lct.Subscribe(theClock); // Get the clock started theClock.Run( ); }
public void Run() { // create a new clock Clock theClock = new Clock(); // create the display and tell it to // subscribe to the clock just created DisplayClock dc = new DisplayClock(); dc.Subscribe(theClock); // create a Log object and tell it // to subscribe to the clock LogCurrentTime lct = new LogCurrentTime(); lct.Subscribe(theClock); // Get the clock started theClock.Run(); }