这个算法有什么错误?我该如何解决?Eclipse告诉我一个错误在main上
area c1 = new area();
import java.awt.Rectangle;
public class ClasseRettangolo {
public class area {
Rectangle box = new Rectangle(5 , 10, 15, 20);
public double surface() {
return ( box.getHeight() * box.getWidth());
}
}
public class perimeter {
Rectangle box = new Rectangle(5 , 10, 15, 20);
public double outline() {
return ((box.getHeight() + box.getWidth())* 2);
}
}
public static void main(String[] args){
area c1 = new area();
perimeter c2 = new perimeter();
System.out.println("The area of the Rectangle is: " + c1.surface());
System.out.println("The perimeter of the Rectangle is: " + c2.outline());
}
}