Question: Write a Java program that uses the Up, , Down , Right (and possibly Left) arrows of the keyboard (or keypad) to move a
Write a Java program that uses the Up, , Down , Right (and possibly Left) arrows of the keyboard (or keypad) to move a ball. (note the Up arrow is called "Up" with ASCII code 38, Down arrow is called "Down" with ASCII code 40, Right arrow is called "Right" with ASCII code. You can also use the 4 keys ijkl, commonly used in ODS game programming.
(c) Modify the code of KeyDemo.java and KeyDemoFrame.java of Deitel 9-th edition so that up,down, and right arrows are used to move the green ball at the lower left corner to the lower right corner. In other words, up arrow will move the ball up one square, right arrow moves that one square to the right etc. Turn in the modified code for the instructor to run and verify.
(d) Capture the screens at several different spots when you move the ball and put in the final document(Word or PDF etc.)
Step by Step Solution
3.45 Rating (148 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
