Problem 3: Generate a State Diagram for the copy machine. In…
Problem 3: Generate a State Diagram for the copy machine. Initially the copy machine is in off state. When power is turned on, the machine reverts to a default state – one copy, automatic contrast, and normal size. While the machine is warming it flashes the ready light. When the machine completes the internal testing, the ready light stops flashing and remains on. Now the machine is ready for copying. The operator may change any of the parameters when the machine is in ready state. The operator may increment or decrement the number of copies, change the size, toggle between automatic and manual contrast, and change the contrast when auto-contrast is disabled. When the parameters are properly set, the operator pushes the start button to begin making copies. Ordinarily copying proceeds until all copies are made. Occasionally the machine may jam or run out of paper. When the machine jams, the operator may clear the blockage and the machine will resume making copies. Adding paper allows the machine to proceed after running out of paper.