Quote:
Originally Posted by EricH
Can we put the lawyers to bed now? I'm pretty sure the intent is FOUR buttons control FOUR commands, in a 1:1 ratio.
|
I'm mostly interested in figuring out what a "command" is so I can make sure that my students are doing it properly, and so I can explain what they're doing wrong when the issue inevitably arises. I could envision somebody writing this piece of code:
Code:
int *fwd[] = {&relay1_fwd, &relay2_fwd, &relay3_fwd, &relay4_fwd, &relay5_fwd};
int *rev[] = {&relay1_rev, &relay2_rev, &relay3_rev, &relay4_rev, &relay5_rev};
int index = 0;
while(true){
if(button == 1)
index = (index + 1) % 5;
if(button == 2){
*(fwd[index]) = !*(fwd[index]);
*(rev[index]) = !*(rev[index]);
}
}
And their index card reads:
Code:
Button 1: Chooses a relay
Button 2: Toggles a relay
So, using two buttons, I am able to turn any of five relays on or off. My command set never changes. I'd call this two commands. I suspect that some people would call it ten, but that seems like a bizarrely strict interpretation, and I'd expect a lot of askance looks from anyone I tried to tell that to. If that is indeed the case, I expect that a lot of teams won't do it properly for a lack of understanding, and that it will be impossible to police.