object orientated bouncing ball