This reminds me of an undergrad assignment I had when taking real time C programming. We were each given a programmable lift controller that looked very lego-ish. We were meant to write a multi threaded C program to react in real time to button presses etc to control the lift. I finished and tested every scenario i could think of - it worked great. Was feeling pretty proud of myself.
The professor gets to my table, presses a few buttons and everything works fine. He nods to himself. Then he starts yanking wires out and the lift kept going. He looks at me, shakes his head and says “safety”. I forgot to make the lift stop if anything unexpected happened :)
Thank goodness there was a safety system on this lift, even if it had to fall 84 floors for it to kick in.