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.
(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:
my error:
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.
The program displays a rectangle or an oval when you select a shape type, and whether it is filled.
my code:
my error:
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 DownStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started