Question: 9.1 ( Move the ball ) Write a program that moves a ball in a panel. You should define a panel class for displaying the

9.1

(Move the ball) Write a program that moves a ball in a panel. You should define a panel class for displaying the ball and provide the methods for moving the ball left, right, up, and down, as shown in Figure 9.22a. Check the boundaries to prevent the ball from moving out of sight completely.

9.1 (Move the ball) Write a program that moves a ball in

(a) You can click a button to move the ball. (b) You can obtain the future value by entering the investment amount, years, and annual interest rate.

my code:

a panel. You should define a panel class for displaying the ball

my error:

and provide the methods for moving the ball left, right, up, and

9.3

(Select geometric figures) Write a program that draws a rectangle or an oval, as shown in Figure 9.23. The user selects a figure from a radio button and specifies whether it is filled by selecting a check button.

down, as shown in Figure 9.22a. Check the boundaries to prevent the

The program displays a rectangle or an oval when you select a shape type, and whether it is filled.

my code:

ball from moving out of sight completely. (a) You can click a

my error:

button to move the ball. (b) You can obtain the future value

help me get these programs to run correctly. even if you have to change the whole code

74 Moving Ball90 76 Investment CalculatorX Investment Amount Years Annual Interest Rate Future Value 10000 3.2 1102266 Calculate Left Right Up Down

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!