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 a Haskell program that calculates a balanced partition of N items where each item has a value between 0 and K such that the difference between the sum of the values of first

Derived Data Type: Array is derived data type to store large collection of data of only one data type. int mark[100]; char names[25]; Function: will be discussed early

#include stdio.h> #include conio.h> #include string.h> void main() {           int i=0,j=0,k=0,l=0;           int a[3][3],temp[3][3];           clrscr();

Write a C# program to compute the Net Pay for employees. The program is to have a Main method and two user-defined methods. The Main method is to input the employee's name (string)

drawbacks in assignments in engeenirng

Problem: (a) Using a class hierarchy of your own choosing, with at least TWO subclass levels, show (i) the use of abstract and concrete forms of Java class and method in you

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

processing two jobs through 2 machine

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome