@@ -0,0 +1,653 @@
+package balls;%0A%0Aimport java.awt.Color;%0Aimport java.awt.Graphics;%0A%0Apublic class BallEntity %7B%0A%09private int size, posX, posY;%0A%0A%09// Constructor for a ball object%0A%09BallEntity() %7B%0A%09%09super();%0A%09%09this.size = 20;%0A%09%09this.posX = 0;%0A%09%09this.posY = 0;%0A%09%7D%0A%0A%09public void move(int x, int y) %7B%0A%09%09%0A%09%09if ( posX %3E 400 %7C%7C posX %3C 0)%7B%0A%09%09%09x = -x;%0A%09%09%7D%0A%09%09System.out.println(%22X is: %22 + x);%0A%09%09System.out.println(%22posX is: %22 + posX);%0A%09%09%0A%09%09posY = posY + y;%0A%09%09posX = posX + x;%0A%09%09%0A%09%09%0A%09%7D%0A%0A%09public int getPosX() %7B%0A%09%09return posX;%0A%09%7D%0A%0A%09public int getPosY() %7B%0A%09%09return posY;%0A%09%7D%0A%0A%09public void paintComponent(Graphics g) %7B%0A%09%09g.setColor(Color.BLACK);%0A%09%09g.fillOval(posX, posY, size, size);%0A%09%7D%0A%0A%7D%0A

Create BallEntity.java