整个文件保存为TestRectangle.java即可public class TestRectangle { public static void main(String[] args){Rectangle r1 = new Rectangle();
System.out.println("(1.0, 2.0) rectangle area is: " + r1.computeArea());
Rectangle r2 = new Rectangle();r2.setInfo(3.0D, 4.0D);System.out.println("(3.0, 4.0) rectangle a
public class TestRectangle { public static void main(String[] args) {Rectangle rectangle1 = new Rectangle();System.out.println(rectangle1.computeArea());Rectangle rec