A blue passenger train moves southwards at a speed of 120km/hr. Unfortunately as it enters a junction it collides with a brown goods train moving northwards. The collision happened 50 minutes after the goods train takes off. Using a Java program illustrate the answer.
We don't do people's homework for them.
If you have a specific problem with some aspect of Java then we're glad to help, but simply copy/pasting your assignment and waiting for an answer is just insulting.
DaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules
Post what you have done so far and someone will help you from there.
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: