Question: it's a lab question pls help ball and the rocket will both move, one after the other. Write Create a new method, bounceBallO, that moves
ball and the rocket will both move, one after the other. Write Create a new method, bounceBallO, that moves the ball smoothly to the floor" of the window and then moves it back up to its original height. The signature of bounceBall) is: publie void bounceBallo To do this you will need to write two consecutive while loops. The first loop will move the ball down until it reaches the lower-right window boundary. Use an xDistance of I and a yDistance of 3. The second loop will move the ball upward as long as it is lower than its original height and has not reached the right side of the window. Use an xDistance of 1 and a yDistance of -3. Test bounceBall0 before someone checks your lab. WACOM
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
