public class Ball { int x; int y; float direction; float speed; int radius; // This is a constructor public Ball(int p1, int p2, float p3, float p4, int p5) { x = p1; y = p2; direction = p3; speed = p4; radius = p5; } // This is another constructor public Ball(int p1, int p2, float p3, int p4) { x = p1; y = p2; direction = (float)(Math.random()*2*Math.PI); speed = p3; radius = p4; } // This is a 3rd constructor public Ball(int p1, int p2) { x = p1; y = p2; direction = (float)(Math.random()*2*Math.PI); speed = 10; radius = 30; } // This is a zero-parameter constructor public Ball() { x = 100; y = 100; direction = (float)(Math.random()*2*Math.PI); speed = 5 + (int)(Math.random()*20); radius = 5 + (int)(Math.random()*20); } }