السلام عليكم
مالخطأ في هذا الكود ؟؟
public abstract class Figure {
int x,y;
public Figure(int a, int b){
x = a;
y = b;
}
public abstract double Surface();
void Affiche(){
System.out.println("Les cordonnées du centre :"
+x+","+y+ ")");
}
class Cercle extends Figure {
int rayon;
static final double PI = 3.14;
public Cercle(int a,int b,int r){
super(a,b);
rayon = r;
}
void Affiche(){
super.Affiche();
System.out.println("cercle de rayon "+rayon);
}
public double Surface(){
return PI*rayon*rayon;
}
}
public static void main(String args[]){
Cercle cl = new Cercle(5,4,2);
}
}شكرا مقدما.
