----------------------------------------------------------------- Pong lab grading scheme Functionality: 50 ----------------------- 10 - paddle moves with mouse 10 - ball moves with timer 10 - detects intersections paddle-walls 10 - detect intersections ball-walls 10 - detect intersections ball-paddle Style and Program structure 50 ----------------------- programming style guidelines: simplicity, clarity , generality. Here are some things to check for. Take a few points off for each, depending on the gravity. -header and comments -every function should have a minimal comment to document what the function does -meaningful names for functions and also for variables -all data in a class should be private and accessed through getters and setters -define constants where necessary -no function should be too long. break it into functions. -if some piece of code is duplicated, it should be a encapsulated as a separate function. -distinguish between local variables and global (class) variables--- only use global variables when necessary in particular for Pong: - the overall logic should be clear. as you read the code, it should be clear how it works , who does what. - all functions that pertain to a ball should be in Ball. Even if the controller is the one who actually moves the ball, it should do it by calling an appropriate method in Ball - all functions that pertain to a paddle should be defined in Paddle. - the methods to detect intersections between ball and Paddle can be defined either in Ball or in Paddle. - the methods to detect intersections between ball and walls should be defined in Ball or in the controller (Pong) - the methods to detect intersections between paddle and walls should be defined either in Paddle or in Pong (since the paddle does not actually know the walls) - the function should do what they are supposed to do and not have side effects. For example, a function that checks for intersections should NOT also move the ball. -all drawing should be done in Pong. Ball and Paddle should provide a drawBall and drawPaddle() function which should be called in the paint method of the the controller (Pong). Extensions: (extra credit)