You pay €4 at an Irish Rail ticket machine. What has to happen before you get a ticket?
You pay four euro at an Irish Rail ticket machine, but the ticket hasn't appeared yet. What has to happen between paying and getting your ticket? You can sketch the same purchase in two ways, depending on what you want to explain.
Compare a parking machine with a train ticket machine. Both can check a payment, manage the purchase and print a ticket. The tickets serve different purposes, but you can use the same three jobs to describe both machines. A module is a part of a system that does a specific job.
Follow your payment to the payment module. It tells the software controller that payment succeeded. The controller asks the ticket printer to print, and the printer delivers the ticket to you. In this block diagram, the middle boxes are modules. The arrows show what passes between parts at their interfaces.
You're labelling the arrow from the payment module to the controller. What does the controller need to hear before it asks for a ticket to be printed? Pick the label that belongs on that arrow.
Start at Waiting, with the fare already selected. When the machine accepts payment, it moves to Paid. It stays there until the ticket comes out, then it moves to Issued. This is a state diagram: boxes show states, and arrow labels show the events that cause the state to change.
Follow your four euro payment to the payment module. It reports success to the controller, which requests a print. The printer delivers the ticket to you. Now trace the states: payment approval takes the machine from Waiting to Paid. The ticket coming out takes it from Paid to Issued.
This time you buy a six euro ticket. The machine has accepted the payment and sent the print request, but the ticket hasn't come out yet. Where would you pause the trace on the state diagram? Pick one answer.
A sketch of the casing might show you where the slot is, but it can't tell you who sends the print request. On the block diagram, the controller sends that request to the printer. That labelled arrow is what makes the relationship clear.
If you're asked to sketch a state diagram for a successful ticket purchase, draw Waiting and mark it as the start state. Add Paid and Issued. Draw an arrow from Waiting to Paid labelled Payment OK, then one from Paid to Issued labelled Ticket out. Each label gives the event that causes the change.