The software for launching the missiles was designed so that both captain and co-captain had to press their LAUNCH
button at the same time in order to trigger a launch. During testing it was discovered that if either operator pressed their LAUNCH
button, the missiles would launch.
"I don't get it," said Barbara the software engineer as she looked at the code. "It clearly says AND:"
if (button1Voltage == HIGH && button2Voltage == HIGH) {
missileRelay.setVoltage(HIGH);
}
else {
missileRelay.setVoltage(LOW);
}
What was causing the bug?