Bouncing Ball, C/C++ Programming

Create an applet that bounces a blue ball inside an applet using Thread. The ball (diameter is 10) will start at position (0,0). When the ball hits the edge of the applet, the ball should bounce off the edge at a randomly selected angle between 20 and 60 degrees (Hint: increase/decrease the x or y value by a random number of 2 to 6). Again, you must use the exact values that I stated in the questions to get credits.

More Hint: When the ball hits the left edge (i.e. x <= 0), the x value should be increased. When the ball hits the bottom edge, the y value should be decreased.
Posted Date: 12/7/2012 12:46:05 AM | Location : United States







Related Discussions:- Bouncing Ball, Assignment Help, Ask Question on Bouncing Ball, Get Answer, Expert's Help, Bouncing Ball Discussions

Write discussion on Bouncing Ball
Your posts are moderated
Related Questions
write c++ programm calculate electricity bill with person name,use ,id

The new and delete operators The C language has explained library functions- malloc() and free() for dynamic allocation and de-allocation of memory. C++ gives yet another appro

A: This will turn o_ "name mangling" for func so that one can connect to code compiled by a C compiler.

the problem description. The order of the C Program should be as follows: Variables and constants Use #define statements to define the constants. Use arr


C program to print L diagonal triangle: void main() {                 int i=0,j=0;                 int arr[rows][cols];                 for (i=0; i

Q: What are some ways try / catch / throw can develop software quality? A: By removing one of the reasons for if statements. The commonly utilized alternative to try / catch

assume that the first integer read with cin specifies the number of values remaining to be entered. that program should read only one value each time cin is executed .a typical inp

world wide web

Aim: To implement a program to display a rectangle, circle and triangle. Code:                       class shape {             public:                         vir