CIS191-s12/Project 5  From MCIS Wiki  Jump to: navigation,
search  You will need to create three classes:    • Ball   •
Paddle   • Brick    A ball knows its x and y coordinates
(doubles) and the previous x and y coordinates. The is where the
ball was at the previous tick. These are all public.  A ball has
an x and y velocity (doubles). These are public.  A ball knows
its color.  Every ball is 5 pixels across and the x, y
coordinate defines the center of the ball.  A ball supports the
following methods:    • void move(): the ball moves, as defined
by the velocity. Reflect off the top (y = 0), the left side (x =
0), and the right side (x = 400). Make the bounces "true" -
don't let the x or y coordinate go "through" a wall.   • void
paint(Graphics g): draw the ball.  The constructor sets the x
and y coordinate, the x and y velocity, and the color. The
initial value of the previous x and y is the same as the initial
x and y.   The paddle knows its x and y coordinates (integers).
The paddle supports two methods: