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
#question.A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a s

1. Jewels can only be removed for polishing from either end of the necklace (i.e. head or tail) 2. Once a jewel type is removed from the necklace, all other instances of the same j

what is the first thing I need to know about Programming?

I. COURSE DESCRIPTION Develops a working knowledge of object-oriented concepts in areas of classes, inheritance, data structures, error handling, templates and file processing.


Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.

C program to show overloading of matrix operator: Write a program for matrix operator overloading. class matrix{                   private :                 int x[

#A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of

A: Provide a friend operator class Base { public: friend std::ostream& operator ... protected: virtual void printOn(std::ostream& o) const; }; inline std::ostr

Rahul is a newbie to the programming and while learning the programming language he came to know the following rules: ???• Each program must start with ''{'' and end with '