Have you tried debugging the code to see what it is doing so you can determine what needs to be changed to make it work the way you want? I use println() statements that print out the values of all...