Watch this video. The lecture provides an overview of state machines and the state diagram in UML. What is the purpose of the state diagram?