static void Main(string[] args) { FireAlarm myFireAlarm = new FireAlarm(); FireHandlerClass myFireHandler = new FireHandlerClass(myFireAlarm); myFireAlarm.ActivateFireAlarm("Kitchen", 3); myFireAlarm.ActivateFireAlarm("Study", 1); myFireAlarm.ActivateFireAlarm("Porch", 5); }
public FireHandlerClass(FireAlarm fireAlarm) { fireAlarm.FireEvent += new FireAlarm.FireEventHandler(ExtinguishFire); }