public class Rectangle {
double width;
double height;
public Rectangle(double width,double height){
this.width=width;
this.height=height;
System.out.println("Kuruluyor");
}
public Rectangle(){
this(1,1);
}
double getArea(){
return width*height;
}
double getPerimeter(){
return 2*(width+height);
}
}
Dosyayı İndir