Question: I was trying to solve this by Matlab ! I started coding it by I have questions abut timer and hoe to set it also

I was trying to solve this by Matlab !
I started coding it by I have questions abut timer and hoe to set it also the other things in the problem. can anyone help me ?
here is my code (I am strill in the begining )
Background After the trebuchet programming assignment, you've decided to give me a thank-you gift of a glitter bomb. Naturally, in addition to packing the largest amount of glitter possible in your device, you have also created a computer terminal that allows me to choose whiclh wire to cut from four possible wires: red, green, yellow, and blue. Once the program begins, the user only has X seconds to make a choice or the glitter shower begins regardless of what wire is cut. The glitter bomb explodes immediately if the yellow or red wires are cut. It is disarmed if the blue wire is cut. If the green wire is cut, the timer is reset, and the user is given the choice of the red, yellow, and blue wires again with the same outcomes as before (blue disarmed; llow or red-glitter) Problem Create the computer interface for your glitter bomb. It should follow the outline below 1) Prompt the user to input a character that corresponds to the first letter of the wire to cut. Show them their options somehow in a nicely formatted menu or other easily understood interface. 2) Checks the input for a valid entry. If not a valid entry, ask again until the input is correct. If they fail after 4 tries additional tries (total of 5 attempts), display 'GLITTER' to the command window and end the program 3) Once their input is correct, display a message to the command window that says GLITTER' (red or yellow wire cut or timer exceeds X seconds), 'DISARMED' (blue wire cut, timer at X seconds or less), or that the timer has reset and they must select again (green wire) If the user cuts the green wire, ask for a new input but do NOT check its validity The bomb is disarmed ONLY if they cut the blue wire within X seconds or less. If they cut the yellow or red wire, wait X seconds or more, or type anything besides the blue wire option, then display 'GLITTER 4) Your program should wait until the user makes a valid input, and then check to see whether the time it took to select an input equaled or exceeded the time limit. You dio NOT have to abort the input step and detonate the glitter bomb after X seconds. Background After the trebuchet programming assignment, you've decided to give me a thank-you gift of a glitter bomb. Naturally, in addition to packing the largest amount of glitter possible in your device, you have also created a computer terminal that allows me to choose whiclh wire to cut from four possible wires: red, green, yellow, and blue. Once the program begins, the user only has X seconds to make a choice or the glitter shower begins regardless of what wire is cut. The glitter bomb explodes immediately if the yellow or red wires are cut. It is disarmed if the blue wire is cut. If the green wire is cut, the timer is reset, and the user is given the choice of the red, yellow, and blue wires again with the same outcomes as before (blue disarmed; llow or red-glitter) Problem Create the computer interface for your glitter bomb. It should follow the outline below 1) Prompt the user to input a character that corresponds to the first letter of the wire to cut. Show them their options somehow in a nicely formatted menu or other easily understood interface. 2) Checks the input for a valid entry. If not a valid entry, ask again until the input is correct. If they fail after 4 tries additional tries (total of 5 attempts), display 'GLITTER' to the command window and end the program 3) Once their input is correct, display a message to the command window that says GLITTER' (red or yellow wire cut or timer exceeds X seconds), 'DISARMED' (blue wire cut, timer at X seconds or less), or that the timer has reset and they must select again (green wire) If the user cuts the green wire, ask for a new input but do NOT check its validity The bomb is disarmed ONLY if they cut the blue wire within X seconds or less. If they cut the yellow or red wire, wait X seconds or more, or type anything besides the blue wire option, then display 'GLITTER 4) Your program should wait until the user makes a valid input, and then check to see whether the time it took to select an input equaled or exceeded the time limit. You dio NOT have to abort the input step and detonate the glitter bomb after X seconds
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
