package Feiji____1;
import java.awt.Graphics;
public class qiu_ {
double x,y;
double w = 10;
double h = 10;
double jd;
public qiu_(double x, double y, double jd) {
super();
this.x = x;
this.y = y;
this.jd = jd;
}
void paint(Graphics g){
g.fillOval((int)x,(int)y, (int)w, (int)h);
x += 5*Math.cos(jd);
y += 5*Math.sin(jd);
if(y >= 470||y <= 70){
jd = -jd;
}
if(x >= 470||x <= 40){
jd = Math.PI-jd;
}
}
}