Figure 2: UML sequence diagram showing the flow of a getline call.