The way forward from here:
once you have the idea of what the newton laws do and how to use them I'd next go onto changing the program as it is to use vector calculation (loads of sources on the net) so that the speed of the ball, the gravity and the thrust force are represented as vectors. Its easier than you think because vectors just represent vertical and horizontal components in 2d (vertical horizontal and forward in 3d, x,y,x)
once you have the idea of what the newton laws do and how to use them I'd next go onto changing the program as it is to use vector calculation (loads of sources on the net) so that the speed of the ball, the gravity and the thrust force are represented as vectors. Its easier than you think because vectors just represent vertical and horizontal components in 2d (vertical horizontal and forward in 3d, x,y,x)