var disasterresponsesystem = new disasterresponsesystem(); disasterresponsesystem.onflooddetected += (sender, e) => { var assistancerequest = new assistancerequest("flood"); assistancerequest.addsupport(new supporttype("prevenient", true)); while(!disasterresponsesystem.allevacuated) { disasterresponsesystem.evacuatearea(); if(!disasterresponsesystem.needstoabandon) { console.writeline("maintain hope, no need to abandon."); } else { console.writeline("safety first, evacuate immediately."); } } console.writeline("request for aid sent, await prevenient measures."); }; disasterresponsesystem.returntobeginning += (sender, e) => { console.writeline("in times of disaster, returning to the beginning to reassess and reapply efforts is essential."); }; disasterresponsesystem.initiateresponse("unavowed");