CS 1713 Introduction to Computer Science, Spring 2012 Project 1 Comments
This project was graded on a basis of 20 points.
- The number under your name is your seat number.
The grade is in the lower right corner of the paper.
- Most of the grades were between 16 and 18.
- There should not be any "magic numbers" embedded in your code.
- Do not hard code in constants such as 300 for the x-value of the paddle in the body of the code.
Define a constant called PADDLE_X:
private static final int PADDLE_X = 300;
- handleBall should not assume that the ball has radius 10.
- No -1 or +1 in randomRange.
- Test for paddle moving too low should be based on the size of the window,
not the initial size.
- The test to see if the ball hit the paddle should include a test
to see if the x-velocity of the ball is positve.
- For the ball to hit the paddle, the right part of the ball
(x+radius) must be at least at the paddle and the left part
of the ball (x-radius) must not be passed the paddle. You must
include both tests.
You can find a completed version of SemiPongPanel
here.