This tutorial uses the State-Machine diagram to describe the main Behavior of the stopwatch. The stopwatch has two stages: (i) Initial and (ii) Final. The Initial stage consists of four States as follows (i) Ready The State where the stopwatch is ready to start. (ii) Running Once it receives the start signal, the stopwatch will run, and the timer will start. In this State, the stopwatch will be triggered by a time Event to increment the time value by 1 per second. (iii) Paused The State where the stopwatch is paused and waiting for the user to restart it. (iv) Stopped The State where the stopwatch stops running. |