I'm really not shur where to start on this method. Especially when it comes to changing the speed and making the arrow keys work. Any help will be appreciated, but if anyone could make me a skeleton of this method or a similar example that would really help, thanks.
void move();
This method must be called after the duration has been entered by the user. This method will begin moving the ball. The direction is initially in the positive x/y direction. The speed should initially be 1. The radius is initially 15. Changes to the direction, the speed, and radius are all performed in this method. These changes are summarized below:
The direction is changed whenever a collision is occurred. The rules for handling the collisions are described in a previous section.
The speed changes whenever the user presses the up/down arrow. The rules for incrementing/decrementing the speed are described in a previous section. The most recent speed should be displayed near the bottom of the Graphics Window immediately upon its change.
The radius changes whenever the user presses the left/right arrow. The rules for incrementing/decrementing the radius are described in a previous section. The most recent radius should be displayed near the bottom of the Graphics Window immediately upon its change.
The remaining time of the animation should be updated continuously and displayed near the bottom of the Graphics Window.
This move method runs until the selected duration for the animation expires. Once the remaining time reaches 0 seconds, the method returns to main.
The speed is the distance moved over the amount of time passed.
I presume you are working with pixels (so distance is number of pixels).
I'm not sure what you are using for time, but it would be simplest for you if you could get it as a floating point value, preferably in seconds.
Without knowing more about your assignment we can't help you much more than that.
(Frankly, it sounds like a poor design, because your move() method must have it's own event/timer loop, check and respond to input, update the graphics, etc -- it might as well be called "play_the_game()" or something like that.)