このアルゴリズムの間違いは何ですか? どうすれば解決できますか?Eclipse でメインの間違いを教えてください
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());
}
}