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
Need Squid Web Proxy with ffmpeg to convert flv to h.264 Project Description: We need a squid proxy setup with the modification that will transcode FLV to h.264 in real-time,

This problem familiarizes you with using random numbers in C++. The program is to compute a good approximation of p using a simulation method called "Monte Carlo". The following fi

program to find if a no . is prime or not

padovan string program 1 : package test.padovanstring; public class PadovanString {     public int stringOccurrences(int n, String str){        if(n >= 40)     return -

Define Array of Structures? An Array of Structures is an assortment of the same data types which are declared as structures. It is useful to store large and different number of

Write a program that computes the cost of a long distance call. The cost of the call is determined according to the following rate schedules. a. A call made between 8:00 AM and 6:

a) Define an Asset base class that provides the following method: class Asset { public:      virtual double getValue()=0; };   This will be the base class for both stock an

flow chart for prime or not

Part 1 Assignment:  develop a calculator in MASM. Text chapters covered:  1 through 4, 5.4, 5.5, 6.3, 7.4 You will develop a "calculator" algorithm in MASM using reverse-

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